Remove debug code and bump version
This commit is contained in:
parent
a78cba3fd5
commit
164b0fa734
3 changed files with 4 additions and 12 deletions
2
Cargo.lock
generated
2
Cargo.lock
generated
|
@ -4,7 +4,7 @@ version = 3
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "none-guard"
|
name = "none-guard"
|
||||||
version = "0.1.0"
|
version = "0.1.2"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"quote",
|
"quote",
|
||||||
"syn",
|
"syn",
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
[package]
|
[package]
|
||||||
name = "none-guard"
|
name = "none-guard"
|
||||||
version = "0.1.1"
|
version = "0.1.2"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
authors = ["Dominic Grimm <dominic@dergrimm.net>"]
|
authors = ["Dominic Grimm <dominic@dergrimm.net>"]
|
||||||
repository = "https://git.dergrimm.net/dergrimm/none-guard"
|
repository = "https://git.dergrimm.net/dergrimm/none-guard"
|
||||||
|
|
12
src/lib.rs
12
src/lib.rs
|
@ -36,20 +36,12 @@ pub fn none_guard(input: TokenStream) -> TokenStream {
|
||||||
|
|
||||||
let is_some_checks = field_checks
|
let is_some_checks = field_checks
|
||||||
.clone()
|
.clone()
|
||||||
.reduce(|acc, e| {
|
.reduce(|acc, e| quote! { #acc && #e })
|
||||||
dbg!(&acc, &e);
|
|
||||||
|
|
||||||
quote! { #acc && #e }
|
|
||||||
})
|
|
||||||
.unwrap();
|
.unwrap();
|
||||||
|
|
||||||
let is_none_checks = field_checks
|
let is_none_checks = field_checks
|
||||||
.map(|tok| quote! { !(#tok) })
|
.map(|tok| quote! { !(#tok) })
|
||||||
.reduce(|acc, e| {
|
.reduce(|acc, e| quote! { #acc && #e })
|
||||||
dbg!(&acc, &e);
|
|
||||||
|
|
||||||
quote! { #acc && #e }
|
|
||||||
})
|
|
||||||
.unwrap();
|
.unwrap();
|
||||||
|
|
||||||
quote! {
|
quote! {
|
||||||
|
|
Loading…
Reference in a new issue