Skip to content

Commit 347fa09

Browse files
committed
perf(build-rs): Remove an allocation
1 parent f419355 commit 347fa09

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

crates/build-rs/src/allow_use.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ fn cargo_version_minor() -> u32 {
2525
// > cargo -V # example output
2626
// cargo 1.82.0 (8f40fc59f 2024-08-21)
2727

28-
String::from_utf8(out.stdout).expect("`cargo -V` should output valid UTF-8")
28+
std::str::from_utf8(&out.stdout).expect("`cargo -V` should output valid UTF-8")
2929
["cargo 1.".len()..]
3030
.split('.')
3131
.next()

0 commit comments

Comments
 (0)