Skip to content

Commit

Permalink
Merge pull request #15 from CGMossa/add_rust_msrv
Browse files Browse the repository at this point in the history
clippy formatting
  • Loading branch information
idanarye authored Dec 22, 2023
2 parents 084c5cd + 912da66 commit a6efe2d
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 10 deletions.
1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ repository = "https://github.com/idanarye/rust-smart-default"
documentation = "https://idanarye.github.io/rust-smart-default/"
readme = "README.md"
keywords = ["default"]
rust-version = "1.56"

[lib]
proc-macro = true
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,5 @@ assert!(Foo::default() == Foo::Baz {
});
```

Requires Rust 1.30+ (for non-string values in attributes)
Requires Rust 1.30+ (for non-string values in attributes), and version 1.56
due to 2021 edition.
18 changes: 9 additions & 9 deletions examples/example.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,14 @@ enum Foo {
}

fn main() {
assert!(
Foo::default()
== Foo::Baz {
a: 12,
b: 0,
c: Some(0),
d: vec![1, 2, 3],
e: "four".to_owned(),
}
assert_eq!(
Foo::default(),
Foo::Baz {
a: 12,
b: 0,
c: Some(0),
d: vec![1, 2, 3],
e: "four".to_owned(),
}
);
}

0 comments on commit a6efe2d

Please sign in to comment.