File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -105,7 +105,7 @@ mod unix {
105105 }
106106 } ;
107107
108- let whom = unsafe {
108+ let user = unsafe {
109109 let ruid = libc:: getuid ( ) ;
110110 let pw = libc:: getpwuid ( ruid) ;
111111 if !pw. is_null ( ) && !( * pw) . pw_name . is_null ( ) {
@@ -116,7 +116,7 @@ mod unix {
116116 }
117117 } ;
118118
119- let whereat = unsafe {
119+ let tty = unsafe {
120120 let tty_ptr = libc:: ttyname ( libc:: STDOUT_FILENO ) ;
121121 if tty_ptr. is_null ( ) {
122122 "somewhere" . to_string ( )
@@ -127,7 +127,7 @@ mod unix {
127127 } ;
128128
129129 let date = DateTime :: < Local > :: from ( SystemTime :: now ( ) ) . format ( "%a %b %e %T %Y" ) ;
130- let banner = format ! ( "Broadcast message from {whom }@{hostname} ({whereat }) ({date}):" ) ;
130+ let banner = format ! ( "Broadcast message from {user }@{hostname} ({tty }) ({date}):" ) ;
131131
132132 blank ( & mut buf) ;
133133 buf += & banner;
@@ -196,7 +196,6 @@ mod unix {
196196 }
197197
198198 // Determine if user is in specified group
199- #[ allow( clippy:: cast_sign_loss) ]
200199 fn is_gr_member ( user : & [ c_char ] , gid : gid_t ) -> bool {
201200 // make sure user exists in database
202201 let pw = unsafe { libc:: getpwnam ( user. as_ptr ( ) ) } ;
You can’t perform that action at this time.
0 commit comments