Skip to content

Commit f1c7924

Browse files
committed
Fix clippy::format-push-string
1 parent 193ffaa commit f1c7924

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

idna/tests/uts46.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88

99
use crate::test::TestFn;
1010
use std::char;
11+
use std::fmt::Write;
1112

1213
use idna::Errors;
1314

@@ -160,8 +161,7 @@ fn unescape(input: &str) -> String {
160161
match char::from_u32(((c1 * 16 + c2) * 16 + c3) * 16 + c4) {
161162
Some(c) => output.push(c),
162163
None => {
163-
output
164-
.push_str(&format!("\\u{:X}{:X}{:X}{:X}", c1, c2, c3, c4));
164+
write!(&mut output,"\\u{:X}{:X}{:X}{:X}", c1, c2, c3, c4).expect("Could not write to output");
165165
}
166166
};
167167
}

0 commit comments

Comments
 (0)