@@ -2938,35 +2938,35 @@ impl From<&libc::passwd> for User {
2938
2938
fn from( pw: & libc:: passwd) -> User {
2939
2939
unsafe {
2940
2940
User {
2941
- name: CStr :: from_ptr( ( * pw ) . pw_name) . to_string_lossy( ) . into_owned( ) ,
2942
- passwd: CString :: new( CStr :: from_ptr( ( * pw ) . pw_passwd) . to_bytes( ) ) . unwrap( ) ,
2941
+ name: CStr :: from_ptr( pw . pw_name) . to_string_lossy( ) . into_owned( ) ,
2942
+ passwd: CString :: new( CStr :: from_ptr( pw . pw_passwd) . to_bytes( ) ) . unwrap( ) ,
2943
2943
#[ cfg( not( all( target_os = "android" , target_pointer_width = "32" ) ) ) ]
2944
- gecos: CString :: new( CStr :: from_ptr( ( * pw ) . pw_gecos) . to_bytes( ) ) . unwrap( ) ,
2945
- dir: PathBuf :: from( OsStr :: from_bytes( CStr :: from_ptr( ( * pw ) . pw_dir) . to_bytes( ) ) ) ,
2946
- shell: PathBuf :: from( OsStr :: from_bytes( CStr :: from_ptr( ( * pw ) . pw_shell) . to_bytes( ) ) ) ,
2947
- uid: Uid :: from_raw( ( * pw ) . pw_uid) ,
2948
- gid: Gid :: from_raw( ( * pw ) . pw_gid) ,
2944
+ gecos: CString :: new( CStr :: from_ptr( pw . pw_gecos) . to_bytes( ) ) . unwrap( ) ,
2945
+ dir: PathBuf :: from( OsStr :: from_bytes( CStr :: from_ptr( pw . pw_dir) . to_bytes( ) ) ) ,
2946
+ shell: PathBuf :: from( OsStr :: from_bytes( CStr :: from_ptr( pw . pw_shell) . to_bytes( ) ) ) ,
2947
+ uid: Uid :: from_raw( pw . pw_uid) ,
2948
+ gid: Gid :: from_raw( pw . pw_gid) ,
2949
2949
#[ cfg( not( any( target_os = "android" ,
2950
2950
target_os = "fuchsia" ,
2951
2951
target_os = "haiku" ,
2952
2952
target_os = "illumos" ,
2953
2953
target_os = "linux" ,
2954
2954
target_os = "solaris" ) ) ) ]
2955
- class: CString :: new( CStr :: from_ptr( ( * pw ) . pw_class) . to_bytes( ) ) . unwrap( ) ,
2955
+ class: CString :: new( CStr :: from_ptr( pw . pw_class) . to_bytes( ) ) . unwrap( ) ,
2956
2956
#[ cfg( not( any( target_os = "android" ,
2957
2957
target_os = "fuchsia" ,
2958
2958
target_os = "haiku" ,
2959
2959
target_os = "illumos" ,
2960
2960
target_os = "linux" ,
2961
2961
target_os = "solaris" ) ) ) ]
2962
- change: ( * pw ) . pw_change,
2962
+ change: pw . pw_change,
2963
2963
#[ cfg( not( any( target_os = "android" ,
2964
2964
target_os = "fuchsia" ,
2965
2965
target_os = "haiku" ,
2966
2966
target_os = "illumos" ,
2967
2967
target_os = "linux" ,
2968
2968
target_os = "solaris" ) ) ) ]
2969
- expire: ( * pw ) . pw_expire
2969
+ expire: pw . pw_expire
2970
2970
}
2971
2971
}
2972
2972
}
@@ -3123,10 +3123,10 @@ impl From<&libc::group> for Group {
3123
3123
fn from( gr: & libc:: group) -> Group {
3124
3124
unsafe {
3125
3125
Group {
3126
- name: CStr :: from_ptr( ( * gr ) . gr_name) . to_string_lossy( ) . into_owned( ) ,
3127
- passwd: CString :: new( CStr :: from_ptr( ( * gr ) . gr_passwd) . to_bytes( ) ) . unwrap( ) ,
3128
- gid: Gid :: from_raw( ( * gr ) . gr_gid) ,
3129
- mem: Group :: members( ( * gr ) . gr_mem)
3126
+ name: CStr :: from_ptr( gr . gr_name) . to_string_lossy( ) . into_owned( ) ,
3127
+ passwd: CString :: new( CStr :: from_ptr( gr . gr_passwd) . to_bytes( ) ) . unwrap( ) ,
3128
+ gid: Gid :: from_raw( gr . gr_gid) ,
3129
+ mem: Group :: members( gr . gr_mem)
3130
3130
}
3131
3131
}
3132
3132
}
0 commit comments