Skip to content

Commit ea79275

Browse files
uefi: Improve From<&CStr16> for String
Remove an unneccessary `as` cast.
1 parent 0ccc1aa commit ea79275

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: uefi/src/data_types/strs.rs

+1-1
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)