@@ -247,15 +247,15 @@ where
247247 T : fmt:: Debug ,
248248{
249249 if let Some ( ref existing) = * option {
250- bail ! ( "{}: {:?} and {:?}" , message , existing , value ) ;
250+ bail ! ( "{message }: {existing :?} and {value :?}" ) ;
251251 }
252252 * option = Some ( value) ;
253253 Ok ( ( ) )
254254}
255255
256256pub fn set_bool ( b : & mut bool , message : & str ) -> Result < ( ) , Error > {
257257 if * b {
258- bail ! ( "{}" , message ) ;
258+ bail ! ( "{message}" ) ;
259259 } else {
260260 * b = true ;
261261 Ok ( ( ) )
@@ -291,7 +291,7 @@ fn bool_attr(key: &str, attr: &Meta) -> Result<Option<bool>, Error> {
291291 } ) ,
292292 ..
293293 } ) => Ok ( Some ( value) ) ,
294- _ => bail ! ( "invalid {} attribute" , key ) ,
294+ _ => bail ! ( "invalid {key } attribute" ) ,
295295 }
296296}
297297
@@ -320,9 +320,9 @@ pub(super) fn tag_attr(attr: &Meta) -> Result<Option<u32>, Error> {
320320 . map_err ( Error :: from)
321321 . map ( Option :: Some ) ,
322322 Lit :: Int ( ref lit) => Ok ( Some ( lit. base10_parse ( ) ?) ) ,
323- _ => bail ! ( "invalid tag attribute: {:?}" , attr ) ,
323+ _ => bail ! ( "invalid tag attribute: {attr :?}" ) ,
324324 } ,
325- _ => bail ! ( "invalid tag attribute: {:?}" , attr ) ,
325+ _ => bail ! ( "invalid tag attribute: {attr :?}" ) ,
326326 }
327327}
328328
@@ -351,6 +351,6 @@ fn tags_attr(attr: &Meta) -> Result<Option<Vec<u32>>, Error> {
351351 . map ( |s| s. trim ( ) . parse :: < u32 > ( ) . map_err ( Error :: from) )
352352 . collect :: < Result < Vec < u32 > , _ > > ( )
353353 . map ( Some ) ,
354- _ => bail ! ( "invalid tag attribute: {:?}" , attr ) ,
354+ _ => bail ! ( "invalid tag attribute: {attr :?}" ) ,
355355 }
356356}
0 commit comments