Skip to content

Commit 36adf34

Browse files
uefi: Improve From<&CStr16> for String
Remove an unneccessary `as` cast.
1 parent 27bcb7a commit 36adf34

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

uefi/src/data_types/strs.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -504,7 +504,7 @@ impl From<&CStr16> for alloc::string::String {
504504
.iter()
505505
.copied()
506506
.map(u16::from)
507-
.map(|int| int as u32)
507+
.map(u32::from)
508508
.map(|int| char::from_u32(int).expect("Should be encodable as UTF-8"))
509509
.collect::<alloc::string::String>()
510510
}

0 commit comments

Comments
 (0)