mirror of
https://github.com/kvorschk/Magisk.git
synced 2026-12-05 03:20:46 -05:00
Ban all unwrap usage in codebase
This commit is contained in:
@@ -9,6 +9,9 @@ path = "lib.rs"
|
||||
[features]
|
||||
selinux = []
|
||||
|
||||
[lints]
|
||||
workspace = true
|
||||
|
||||
[build-dependencies]
|
||||
cxx-gen = { workspace = true }
|
||||
|
||||
|
||||
@@ -132,13 +132,9 @@ impl PositionalArgParser<'_> {
|
||||
}
|
||||
|
||||
fn ensure_end(&mut self) -> Result<(), EarlyExit> {
|
||||
if self.0.len() == 0 {
|
||||
Ok(())
|
||||
} else {
|
||||
Err(EarlyExit::from(format!(
|
||||
"Unrecognized argument: {}\n",
|
||||
self.0.next().unwrap()
|
||||
)))
|
||||
match self.0.next() {
|
||||
None => Ok(()),
|
||||
Some(s) => Err(EarlyExit::from(format!("Unrecognized argument: {s}\n"))),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user