We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2aa79ea commit 89ba561Copy full SHA for 89ba561
benches/lib.rs
@@ -103,6 +103,21 @@ fn format_macro_test() {
103
assert_eq!(String::from(DATETIME), datetime);
104
}
105
106
+/// Implicit named arguments were added in Rust 1.58
107
+#[bench]
108
+fn format_macro_implicit_args(b: &mut Bencher) {
109
+ b.iter(|| {
110
+ let datetime: &str = &format!("{DATE}T{TIME}");
111
+ test::black_box(datetime);
112
+ });
113
+}
114
+
115
+#[test]
116
+fn format_macro_implicit_args_test() {
117
+ let datetime: &str = &format!("{DATE}{T}{TIME}");
118
+ assert_eq!(String::from(DATETIME), datetime);
119
120
121
////
122
#[bench]
123
#[cfg(unix)]
0 commit comments