From 04f52c4de926eca0e5da5e42e9928aa63fcae57c Mon Sep 17 00:00:00 2001 From: Benjamin Sago Date: Sun, 10 Jan 2016 21:15:50 +1300 Subject: [PATCH] Remove unnecessary 'pub's in C structs These structures are all private to the current module anyway, so these `pub`s do nothing. --- src/lib.rs | 42 +++++++++++++++++++++--------------------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index 5dfccf0..d38ff9d 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -169,36 +169,36 @@ pub trait Users { #[cfg(any(target_os = "macos", target_os = "freebsd", target_os = "dragonfly"))] #[repr(C)] struct c_passwd { - pub pw_name: *const c_char, // user name - pub pw_passwd: *const c_char, // password field - pub pw_uid: uid_t, // user ID - pub pw_gid: gid_t, // group ID - pub pw_change: time_t, // password change time - pub pw_class: *const c_char, - pub pw_gecos: *const c_char, - pub pw_dir: *const c_char, // user's home directory - pub pw_shell: *const c_char, // user's shell - pub pw_expire: time_t, // password expiry time + pw_name: *const c_char, // user name + pw_passwd: *const c_char, // password field + pw_uid: uid_t, // user ID + pw_gid: gid_t, // group ID + pw_change: time_t, // password change time + pw_class: *const c_char, + pw_gecos: *const c_char, + pw_dir: *const c_char, // user's home directory + pw_shell: *const c_char, // user's shell + pw_expire: time_t, // password expiry time } #[cfg(target_os = "linux")] #[repr(C)] struct c_passwd { - pub pw_name: *const c_char, // user name - pub pw_passwd: *const c_char, // password field - pub pw_uid: uid_t, // user ID - pub pw_gid: gid_t, // group ID - pub pw_gecos: *const c_char, - pub pw_dir: *const c_char, // user's home directory - pub pw_shell: *const c_char, // user's shell + pw_name: *const c_char, // user name + pw_passwd: *const c_char, // password field + pw_uid: uid_t, // user ID + pw_gid: gid_t, // group ID + pw_gecos: *const c_char, + pw_dir: *const c_char, // user's home directory + pw_shell: *const c_char, // user's shell } #[repr(C)] struct c_group { - pub gr_name: *const c_char, // group name - pub gr_passwd: *const c_char, // password - pub gr_gid: gid_t, // group id - pub gr_mem: *const *const c_char, // names of users in the group + gr_name: *const c_char, // group name + gr_passwd: *const c_char, // password + gr_gid: gid_t, // group id + gr_mem: *const *const c_char, // names of users in the group } extern {