File tree Expand file tree Collapse file tree 1 file changed +10
-13
lines changed
crates/stackable-versioned-macros/src/codegen/common Expand file tree Collapse file tree 1 file changed +10
-13
lines changed Original file line number Diff line number Diff line change @@ -58,12 +58,10 @@ pub(crate) fn format_container_from_ident(ident: &Ident) -> Ident {
58
58
///
59
59
/// See [`DEPRECATED_FIELD_PREFIX`].
60
60
pub ( crate ) fn remove_deprecated_field_prefix ( ident : & Ident ) -> Ident {
61
- format_ident ! (
62
- "{}" ,
63
- ident
64
- . to_string( )
65
- . trim_start_matches( DEPRECATED_FIELD_PREFIX )
66
- )
61
+ let ident = ident. to_string ( ) ;
62
+ let ident = ident. trim_start_matches ( DEPRECATED_FIELD_PREFIX ) ;
63
+
64
+ format_ident ! ( "{ident}" , )
67
65
}
68
66
69
67
/// Removes the deprecated prefix from a variant ident.
@@ -73,11 +71,10 @@ pub(crate) fn remove_deprecated_variant_prefix(ident: &Ident) -> Ident {
73
71
// NOTE (@Techassi): Currently Clippy only issues a warning for variants
74
72
// with underscores in their name. That's why we additionally remove the
75
73
// underscore from the ident to use the expected name during code generation.
76
- format_ident ! (
77
- "{}" ,
78
- ident
79
- . to_string( )
80
- . trim_start_matches( DEPRECATED_VARIANT_PREFIX )
81
- . trim_start_matches( '_' )
82
- )
74
+ let ident = ident. to_string ( ) ;
75
+ let ident = ident
76
+ . trim_start_matches ( DEPRECATED_VARIANT_PREFIX )
77
+ . trim_start_matches ( '_' ) ;
78
+
79
+ format_ident ! ( "{ident}" , )
83
80
}
You can’t perform that action at this time.
0 commit comments