Skip to content

Commit

Permalink
Use as_ref instead of as_slice (#1336)
Browse files Browse the repository at this point in the history
  • Loading branch information
yujincheng08 authored Feb 2, 2024
1 parent f80d076 commit a4b9ea0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions userspace/ksud/src/ksu.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
use anyhow::{Ok, Result};
use core::slice::SlicePattern;
use getopts::Options;
use std::env;
#[cfg(unix)]
Expand Down Expand Up @@ -46,8 +45,9 @@ fn set_identity(uid: u32, gid: u32, groups: &[u32]) {
.iter()
.map(|g| unsafe { Gid::from_raw(*g) })
.collect::<Vec<_>>()
.as_slice(),
);
.as_ref(),
)
.ok();
let gid = unsafe { Gid::from_raw(gid) };
let uid = unsafe { Uid::from_raw(uid) };
set_thread_res_gid(gid, gid, gid).ok();
Expand Down

0 comments on commit a4b9ea0

Please sign in to comment.