Use identifiers in format!

This commit is contained in:
Stephen Chung
2022-08-11 19:01:23 +08:00
parent ceaf9fab1b
commit be448dfe4d
36 changed files with 164 additions and 206 deletions

View File

@@ -68,11 +68,11 @@ fn test_native_overload() -> Result<(), Box<EvalAltResult>> {
.register_fn(
"+",
|s1: ImmutableString, s2: ImmutableString| -> ImmutableString {
format!("{}***{}", s1, s2).into()
format!("{s1}***{s2}").into()
},
)
.register_fn("+", |s1: ImmutableString, _: ()| -> ImmutableString {
format!("{} Foo!", s1).into()
format!("{s1} Foo!").into()
});
assert_eq!(