Skip to content

Commit

Permalink
refine code
Browse files Browse the repository at this point in the history
  • Loading branch information
5ec1cff committed Jan 1, 2024
1 parent 863a53f commit 762e067
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions userspace/ksud/src/ksu.rs
Original file line number Diff line number Diff line change
Expand Up @@ -181,8 +181,7 @@ pub fn root_shell() -> Result<()> {
}
let mut gid: Option<u32> = None;
// if -g provided, use it.
if matches.opt_present("g") {
let g = matches.opt_str("g").unwrap();
if let Some(g) = matches.opt_str("g") {
if let core::result::Result::Ok(id) = g.parse::<u32>() {
gid = Some(id);
} else {
Expand Down

0 comments on commit 762e067

Please sign in to comment.