1
Fork 0
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:
Jeong YunWon 2021-06-11 14:27:14 +09:00
parent fb67e54e20
commit e985131c83

View file

@ -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);