@@ -10,7 +10,7 @@ use fluent_bundle::{FluentArgs, FluentBundle, FluentResource, FluentValue};
1010
1111fn custom_formatter < M : MemoizerKind > ( num : & FluentValue , _intls : & M ) -> Option < String > {
1212 match num {
13- FluentValue :: Number ( n) => Some ( format ! ( "CUSTOM({})" , n. value) . into ( ) ) ,
13+ FluentValue :: Number ( n) => Some ( format ! ( "CUSTOM({})" , n. value) ) ,
1414 _ => None ,
1515 }
1616}
@@ -59,7 +59,7 @@ key-var-with-arg = Here is a variable formatted with an argument { NUMBER($num,
5959 . get_message ( "key-implicit" )
6060 . expect ( "Message doesn't exist." ) ;
6161 let pattern = msg. value ( ) . expect ( "Message has no value." ) ;
62- let value = bundle. format_pattern ( & pattern, None , & mut errors) ;
62+ let value = bundle. format_pattern ( pattern, None , & mut errors) ;
6363 assert_eq ! ( value, "Here is an implicitly encoded number: 5." ) ;
6464 println ! ( "{}" , value) ;
6565
@@ -72,7 +72,7 @@ key-var-with-arg = Here is a variable formatted with an argument { NUMBER($num,
7272 . get_message ( "key-implicit" )
7373 . expect ( "Message doesn't exist." ) ;
7474 let pattern = msg. value ( ) . expect ( "Message has no value." ) ;
75- let value = bundle. format_pattern ( & pattern, None , & mut errors) ;
75+ let value = bundle. format_pattern ( pattern, None , & mut errors) ;
7676 assert_eq ! ( value, "Here is an implicitly encoded number: CUSTOM(5)." ) ;
7777 println ! ( "{}" , value) ;
7878
@@ -82,7 +82,7 @@ key-var-with-arg = Here is a variable formatted with an argument { NUMBER($num,
8282 . get_message ( "key-explicit" )
8383 . expect ( "Message doesn't exist." ) ;
8484 let pattern = msg. value ( ) . expect ( "Message has no value." ) ;
85- let value = bundle. format_pattern ( & pattern, None , & mut errors) ;
85+ let value = bundle. format_pattern ( pattern, None , & mut errors) ;
8686 assert_eq ! ( value, "Here is an explicitly encoded number: CUSTOM(5)." ) ;
8787 println ! ( "{}" , value) ;
8888
@@ -92,7 +92,7 @@ key-var-with-arg = Here is a variable formatted with an argument { NUMBER($num,
9292 let pattern = msg. value ( ) . expect ( "Message has no value." ) ;
9393 let mut args = FluentArgs :: new ( ) ;
9494 args. set ( "num" , FluentValue :: from ( -15 ) ) ;
95- let value = bundle. format_pattern ( & pattern, Some ( & args) , & mut errors) ;
95+ let value = bundle. format_pattern ( pattern, Some ( & args) , & mut errors) ;
9696 assert_eq ! (
9797 value,
9898 "Here is an implicitly encoded variable: CUSTOM(-15)."
@@ -105,7 +105,7 @@ key-var-with-arg = Here is a variable formatted with an argument { NUMBER($num,
105105 let pattern = msg. value ( ) . expect ( "Message has no value." ) ;
106106 let mut args = FluentArgs :: new ( ) ;
107107 args. set ( "num" , FluentValue :: from ( -15 ) ) ;
108- let value = bundle. format_pattern ( & pattern, Some ( & args) , & mut errors) ;
108+ let value = bundle. format_pattern ( pattern, Some ( & args) , & mut errors) ;
109109 assert_eq ! (
110110 value,
111111 "Here is an explicitly encoded variable: CUSTOM(-15)."
@@ -129,7 +129,7 @@ key-var-with-arg = Here is a variable formatted with an argument { NUMBER($num,
129129 } ,
130130 ) ;
131131 args. set ( "num" , num) ;
132- let value = bundle. format_pattern ( & pattern, Some ( & args) , & mut errors) ;
132+ let value = bundle. format_pattern ( pattern, Some ( & args) , & mut errors) ;
133133
134134 // Notice, that since we specificed minimum and maximum fraction digits options
135135 // to be 1 and 8 when construction the argument, and then the minimum fraction
0 commit comments