diff options
author | Christian Duerr <contact@christianduerr.com> | 2021-09-15 21:13:49 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-09-15 21:13:49 +0000 |
commit | c96047dc73d502bb314c63cc9c8dc91dc294b9a2 (patch) | |
tree | 8285d58c2ed982ed8eca5b25c092f4ef9bde3956 | |
parent | 990f3f81f064f572aa0e6a528cfb3eb5215b88a4 (diff) | |
download | alacritty-c96047dc73d502bb314c63cc9c8dc91dc294b9a2.tar.gz alacritty-c96047dc73d502bb314c63cc9c8dc91dc294b9a2.zip |
Remove unused struct fields
While it might be nice to have the full `Passwd` struct around should
anything ever change in the future, there's really no reason why
Alacritty would need this information. So just removing things for now
makes more sense than adding `#[allow(unused)]`.
-rw-r--r-- | alacritty_terminal/src/tty/unix.rs | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/alacritty_terminal/src/tty/unix.rs b/alacritty_terminal/src/tty/unix.rs index ba59bb66..a3c35f95 100644 --- a/alacritty_terminal/src/tty/unix.rs +++ b/alacritty_terminal/src/tty/unix.rs @@ -82,10 +82,6 @@ fn set_controlling_terminal(fd: c_int) { #[derive(Debug)] struct Passwd<'a> { name: &'a str, - passwd: &'a str, - uid: libc::uid_t, - gid: libc::gid_t, - gecos: &'a str, dir: &'a str, shell: &'a str, } @@ -122,10 +118,6 @@ fn get_pw_entry(buf: &mut [i8; 1024]) -> Passwd<'_> { // Build a borrowed Passwd struct. Passwd { name: unsafe { CStr::from_ptr(entry.pw_name).to_str().unwrap() }, - passwd: unsafe { CStr::from_ptr(entry.pw_passwd).to_str().unwrap() }, - uid: entry.pw_uid, - gid: entry.pw_gid, - gecos: unsafe { CStr::from_ptr(entry.pw_gecos).to_str().unwrap() }, dir: unsafe { CStr::from_ptr(entry.pw_dir).to_str().unwrap() }, shell: unsafe { CStr::from_ptr(entry.pw_shell).to_str().unwrap() }, } |