Use as_ref instead of as_slice (#1336)
This commit is contained in:
@@ -1,5 +1,4 @@
|
|||||||
use anyhow::{Ok, Result};
|
use anyhow::{Ok, Result};
|
||||||
use core::slice::SlicePattern;
|
|
||||||
use getopts::Options;
|
use getopts::Options;
|
||||||
use std::env;
|
use std::env;
|
||||||
#[cfg(unix)]
|
#[cfg(unix)]
|
||||||
@@ -46,8 +45,9 @@ fn set_identity(uid: u32, gid: u32, groups: &[u32]) {
|
|||||||
.iter()
|
.iter()
|
||||||
.map(|g| unsafe { Gid::from_raw(*g) })
|
.map(|g| unsafe { Gid::from_raw(*g) })
|
||||||
.collect::<Vec<_>>()
|
.collect::<Vec<_>>()
|
||||||
.as_slice(),
|
.as_ref(),
|
||||||
);
|
)
|
||||||
|
.ok();
|
||||||
let gid = unsafe { Gid::from_raw(gid) };
|
let gid = unsafe { Gid::from_raw(gid) };
|
||||||
let uid = unsafe { Uid::from_raw(uid) };
|
let uid = unsafe { Uid::from_raw(uid) };
|
||||||
set_thread_res_gid(gid, gid, gid).ok();
|
set_thread_res_gid(gid, gid, gid).ok();
|
||||||
|
|||||||
Reference in New Issue
Block a user