diff --git a/README.md b/README.md index bf31c56..f15d717 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ Tiny crate to set default values for serde fields via inline attribute declarati ## Overview -This crate is an approach to do what serde-rs/serde#368 purposes. +This crate is an approach to do what [serde-rs/serde#368](https://github.com/serde-rs/serde/issues/368) purposes. If you want to set default values in plain [`serde`](https://serde.rs/), you have to create a function and link to it with `#[serde(default = "...")`. This may be good if you need to do calculations to get the default value, but often you just want a simple integer or string to be the default value and have to create a whole function to return a hard-coded value. ```rust diff --git a/src/lib.rs b/src/lib.rs index facb51f..c522950 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,3 +1,5 @@ +#![doc = include_str!("../README.md")] + use proc_macro::TokenStream; use syn::{parse_macro_input, Item};