File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -61,9 +61,9 @@ impl Shell {
61
61
let mut null_count = 0 ;
62
62
unsafe {
63
63
while null_count <= 1 {
64
- if ( * ( cur_env_ptr. add ( i) ) ) == Char16 :: from_u16_unchecked ( 0 ) . into ( ) {
64
+ if ( * ( cur_env_ptr. add ( i) ) ) == Char16 :: from_u16 ( 0 ) . unwrap ( ) . into ( ) {
65
65
if cur_len > 0 {
66
- env_vec. push ( CStr16 :: from_char16_with_nul_unchecked (
66
+ env_vec. push ( CStr16 :: from_char16_with_nul (
67
67
& ( * ptr:: slice_from_raw_parts ( cur_start. cast ( ) , cur_len + 1 ) ) ,
68
68
) ) ;
69
69
}
@@ -88,7 +88,7 @@ impl Shell {
88
88
///
89
89
/// * `name` - The environment variable for which to set the value
90
90
/// * `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
92
92
/// not
93
93
///
94
94
/// # Returns
You can’t perform that action at this time.
0 commit comments