@@ -72,18 +72,6 @@ impl<'source> From<&ast::Message<'source>> for DisplayableNode<'source> {
72
72
}
73
73
}
74
74
75
- impl < ' source > From < ( & ast:: Message < ' source > , & ast:: Attribute < ' source > ) >
76
- for DisplayableNode < ' source >
77
- {
78
- fn from ( input : ( & ast:: Message < ' source > , & ast:: Attribute < ' source > ) ) -> Self {
79
- DisplayableNode {
80
- node_type : DisplayableNodeType :: Message ,
81
- id : input. 0 . id . name ,
82
- attribute : Some ( input. 1 . id . name ) ,
83
- }
84
- }
85
- }
86
-
87
75
impl < ' source > From < & ast:: Term < ' source > > for DisplayableNode < ' source > {
88
76
fn from ( term : & ast:: Term < ' source > ) -> Self {
89
77
DisplayableNode {
@@ -179,10 +167,10 @@ impl<'source> FluentValue<'source> {
179
167
impl < ' source > fmt:: Display for FluentValue < ' source > {
180
168
fn fmt ( & self , f : & mut fmt:: Formatter < ' _ > ) -> fmt:: Result {
181
169
match self {
182
- FluentValue :: String ( s) => write ! ( f , "{}" , s) ,
183
- FluentValue :: Number ( n) => write ! ( f , "{}" , n) ,
170
+ FluentValue :: String ( s) => f . write_str ( s) ,
171
+ FluentValue :: Number ( n) => f . write_str ( n) ,
184
172
FluentValue :: Error ( d) => write ! ( f, "{}" , d) ,
185
- FluentValue :: None ( ) => write ! ( f , "???" ) ,
173
+ FluentValue :: None ( ) => f . write_str ( "???" ) ,
186
174
}
187
175
}
188
176
}
0 commit comments