Skip to content

Commit f5d84a5

Browse files
RenTrieuphip1611
andcommitted
uefi: Revise env functions to use panicking function calls
Co-authored-by: Philipp Schuster <phip1611@gmail.com>
1 parent dc388f7 commit f5d84a5

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

uefi/src/proto/shell/mod.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,9 @@ impl Shell {
6363
while null_count <= 1 {
6464
if (*(cur_env_ptr.add(i))) == Char16::from_u16_unchecked(0).into() {
6565
if cur_len > 0 {
66-
env_vec.push(CStr16::from_char16_with_nul_unchecked(
66+
env_vec.push(CStr16::from_char16_with_nul(
6767
&(*ptr::slice_from_raw_parts(cur_start.cast(), cur_len + 1)),
68-
));
68+
).unwrap());
6969
}
7070
cur_len = 0;
7171
null_count += 1;
@@ -88,7 +88,7 @@ impl Shell {
8888
///
8989
/// * `name` - The environment variable for which to set the value
9090
/// * `value` - The new value of the environment variable
91-
/// * `volatile` - Indicates whether or not the variable is volatile or
91+
/// * `volatile` - Indicates whether the variable is volatile or
9292
/// not
9393
///
9494
/// # Returns

0 commit comments

Comments
 (0)