Adjust names of negated style methods (#11453)
This PR adjusts the names of the negated style methods by moving the `neg_` to after the property name instead of before. This will help keep related style methods grouped together in completions. It also makes it a bit clearer that the negation applies to the value. ### Before ```rs div() .neg_mx_1() .neg_mt_2() ``` ### After ```rs div() .mx_neg_1() .mt_neg_2() ``` Release Notes: - N/A
This commit is contained in:
parent
32b59bfa0e
commit
8871fec2a8
6 changed files with 12 additions and 12 deletions
|
@ -114,16 +114,16 @@ fn generate_predefined_setter(
|
|||
negate: bool,
|
||||
doc_string: &str,
|
||||
) -> TokenStream2 {
|
||||
let (negation_prefix, negation_token) = if negate {
|
||||
("neg_", quote! { - })
|
||||
let (negation_qualifier, negation_token) = if negate {
|
||||
("_neg", quote! { - })
|
||||
} else {
|
||||
("", quote! {})
|
||||
};
|
||||
|
||||
let method_name = if length.is_empty() {
|
||||
format_ident!("{}{}", negation_prefix, name)
|
||||
format_ident!("{name}{negation_qualifier}")
|
||||
} else {
|
||||
format_ident!("{}{}_{}", negation_prefix, name, length)
|
||||
format_ident!("{name}{negation_qualifier}_{length}")
|
||||
};
|
||||
|
||||
let field_assignments = fields
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue