1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-07-30 20:47:46 +00:00

Replace deprecated from_c_str with from_buf in id

This commit is contained in:
Ivan Ukhov 2014-08-09 06:55:12 +02:00
parent b65719638d
commit dd1f0df69f

View file

@ -256,12 +256,12 @@ fn pline(possible_pw: Option<c_passwd>) {
possible_pw.unwrap() possible_pw.unwrap()
}; };
let pw_name = unsafe { from_c_str(pw.pw_name) }; let pw_name = unsafe { from_buf(pw.pw_name as *const u8) };
let pw_passwd = unsafe { from_c_str(pw.pw_passwd)}; let pw_passwd = unsafe { from_buf(pw.pw_passwd as *const u8) };
let pw_class = unsafe { from_c_str(pw.pw_class) }; let pw_class = unsafe { from_buf(pw.pw_class as *const u8) };
let pw_gecos = unsafe { from_c_str(pw.pw_gecos) }; let pw_gecos = unsafe { from_buf(pw.pw_gecos as *const u8) };
let pw_dir = unsafe { from_c_str(pw.pw_dir) }; let pw_dir = unsafe { from_buf(pw.pw_dir as *const u8) };
let pw_shell = unsafe { from_c_str(pw.pw_shell) }; let pw_shell = unsafe { from_buf(pw.pw_shell as *const u8) };
println!( println!(
"{:s}:{:s}:{:u}:{:u}:{:s}:{:d}:{:d}:{:s}:{:s}:{:s}", "{:s}:{:s}:{:u}:{:u}:{:s}:{:d}:{:d}:{:s}:{:s}:{:s}",