mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-11-07 11:21:07 +00:00
Simplify some Option / Result / ? operator patterns (#8653)
* Simplify some Option / Result / ? operator patterns When those match a combinator exactly. Tool-aided by [comby-rust](https://github.com/huitseeker/comby-rust). * adjust after review * adjust post-review
This commit is contained in:
1 parent
541692c4a8
commit
052be8bbef
37 files changed
+77
-188
No files matched your search
@@ -246,7 +246,7 @@ fn parse_target(s: &str) -> (String, Level) {
|
||||
Some(i) => {
|
||||
let target = s[0..i].to_string();
|
||||
if s.len() > i {
|
||||
let level = s[i + 1..s.len()].parse::<Level>().unwrap_or(Level::TRACE);
|
||||
let level = s[i + 1..].parse::<Level>().unwrap_or(Level::TRACE);
|
||||
(target, level)
|
||||
} else {
|
||||
(target, Level::TRACE)
|
||||
|
||||
Reference in new issue
Block a user