Skip to content

Commit

Permalink
Remove quotation marks from metas in tests
Browse files Browse the repository at this point in the history
This format is better for syntax highlighting and recommended going forward.
  • Loading branch information
TedDriggs committed Jul 16, 2024
1 parent ed9798d commit da455f6
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
12 changes: 6 additions & 6 deletions derive_builder/tests/setter_custom.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,19 @@ extern crate pretty_assertions;
extern crate derive_builder;

#[derive(Debug, PartialEq, Default, Builder, Clone)]
#[builder(setter(skip = "false"), default)]
#[builder(setter(skip = false), default)]
struct SetterCustom {
#[builder(setter(custom = "true"))]
#[builder(setter(custom = true))]
setter_custom_by_explicit_opt_in: u32,
#[builder(setter(custom))]
setter_custom_shorthand: u32,
#[builder(setter(custom = "false"))]
#[builder(setter(custom = false))]
setter_custom_by_explicit_opt_out: u32,
#[builder(setter(custom = "true"), default = "4")]
#[builder(setter(custom = true), default = "4")]
setter_custom_with_explicit_default: u32,
#[builder(setter(custom = "true", strip_option))]
#[builder(setter(custom = true, strip_option))]
setter_custom_with_strip_option: Option<u32>,
#[builder(try_setter, setter(custom = "true", strip_option))]
#[builder(try_setter, setter(custom = true, strip_option))]
setter_custom_with_strip_option_try_setter: Option<u32>,
}

Expand Down
6 changes: 3 additions & 3 deletions derive_builder/tests/skip-setter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ fn new_notdefaultable() -> NotDefaultable {
}

#[derive(Debug, PartialEq, Default, Builder, Clone)]
#[builder(setter(skip = "false"))]
#[builder(setter(skip = false))]
struct SetterOptOut {
setter_present_by_explicit_default: u32,
#[builder(setter(skip = "true"))]
#[builder(setter(skip = true))]
setter_skipped_by_explicit_opt_out: u32,
#[builder(setter(skip))]
setter_skipped_by_shorthand_opt_out: u32,
Expand All @@ -27,7 +27,7 @@ struct SetterOptOut {
#[builder(setter(skip))]
struct SetterOptIn {
setter_skipped_by_shorthand_default: u32,
#[builder(setter(skip = false))] // Should be still OK without quotes
#[builder(setter(skip = false))]
setter_present_by_explicit_opt_in: u32,
#[builder(setter)]
setter_present_by_shorthand_opt_in: u32,
Expand Down

0 comments on commit da455f6

Please sign in to comment.