mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-29 20:17:45 +00:00
uucore: remove unused warning of sort_groups
This commit is contained in:
parent
fb67e54e20
commit
e985131c83
1 changed files with 1 additions and 0 deletions
|
@ -101,6 +101,7 @@ pub fn get_groups_gnu(arg_id: Option<u32>) -> IOResult<Vec<gid_t>> {
|
|||
Ok(sort_groups(groups, egid))
|
||||
}
|
||||
|
||||
#[cfg(all(unix, feature = "process"))]
|
||||
fn sort_groups(mut groups: Vec<gid_t>, egid: gid_t) -> Vec<gid_t> {
|
||||
if let Some(index) = groups.iter().position(|&x| x == egid) {
|
||||
groups[..=index].rotate_right(1);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue