File tree Expand file tree Collapse file tree 1 file changed +2
-0
lines changed Expand file tree Collapse file tree 1 file changed +2
-0
lines changed Original file line number Diff line number Diff line change @@ -3732,6 +3732,7 @@ impl User {
3732
3732
/// let res = User::from_uid(Uid::from_raw(0)).unwrap().unwrap();
3733
3733
/// assert_eq!(res.name, "root");
3734
3734
/// ```
3735
+ #[ doc( alias( "getpwuid" , "getpwuid_r" ) ) ]
3735
3736
pub fn from_uid( uid: Uid ) -> Result <Option <Self >> {
3736
3737
// SAFETY: `getpwuid_r` will write to `res` if it initializes the value
3737
3738
// at `pwd`.
@@ -3755,6 +3756,7 @@ impl User {
3755
3756
/// let res = User::from_name("root").unwrap().unwrap();
3756
3757
/// assert_eq!(res.name, "root");
3757
3758
/// ```
3759
+ #[ doc( alias( "getpwnam" , "getpwnam_r" ) ) ]
3758
3760
pub fn from_name( name: & str ) -> Result <Option <Self >> {
3759
3761
let name = match CString :: new( name) {
3760
3762
Ok ( c_str) => c_str,
You can’t perform that action at this time.
0 commit comments