mirror of
https://github.com/bytedream/serde-inline-default.git
synced 2025-06-27 02:20:32 +02:00
Compare commits
2 Commits
Author | SHA1 | Date | |
---|---|---|---|
5d0f313523 | |||
c020a6e0e4 |
@ -1,18 +1,17 @@
|
||||
[package]
|
||||
name = "serde-inline-default"
|
||||
version = "0.2.0"
|
||||
authors = ["ByteDream"]
|
||||
version = "0.2.1"
|
||||
authors = ["bytedream"]
|
||||
edition = "2021"
|
||||
description = "Serde default values via inline declaration"
|
||||
readme = "README.md"
|
||||
repository = "https://github.com/ByteDream/serde-inline-default"
|
||||
repository = "https://github.com/bytedream/serde-inline-default"
|
||||
license = "MIT OR Apache-2.0"
|
||||
keywords = ["serde", "serialization"]
|
||||
categories = ["encoding"]
|
||||
|
||||
[lib]
|
||||
proc-macro = true
|
||||
|
||||
doctest = false
|
||||
|
||||
[dependencies]
|
||||
|
@ -27,6 +27,7 @@ pub(crate) fn expand_struct(mut item: ItemStruct) -> proc_macro::TokenStream {
|
||||
|
||||
let inline_fn = quote! {
|
||||
#[doc(hidden)]
|
||||
#[allow(non_snake_case)]
|
||||
fn #fn_name_ident () -> #return_type {
|
||||
#default
|
||||
}
|
||||
|
Reference in New Issue
Block a user