mirror of
https://github.com/apognu/tuigreet.git
synced 2024-11-22 12:44:06 +03:00
parent
3d9336eaa4
commit
2aeca1b63d
@ -203,7 +203,14 @@ pub fn get_users(min_uid: u16, max_uid: u16) -> Vec<User> {
|
|||||||
username: user.name().to_string_lossy().to_string(),
|
username: user.name().to_string_lossy().to_string(),
|
||||||
name: match user.gecos() {
|
name: match user.gecos() {
|
||||||
name if name.is_empty() => None,
|
name if name.is_empty() => None,
|
||||||
name => Some(name.to_string_lossy().to_string()),
|
name => {
|
||||||
|
let name = name.to_string_lossy();
|
||||||
|
|
||||||
|
match name.split_once(',') {
|
||||||
|
Some((name, _)) => Some(name.to_string()),
|
||||||
|
None => Some(name.to_string()),
|
||||||
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
.collect();
|
.collect();
|
||||||
|
Loading…
Reference in New Issue
Block a user