mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-13 08:11:04 +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:
committed by
GitHub
parent
541692c4a8
commit
052be8bbef
@@ -490,10 +490,7 @@ mod tests {
|
||||
let pre_runtime_digests = header.digest.logs.iter().filter_map(|d| d.as_pre_runtime());
|
||||
let seals = header.digest.logs.iter().filter_map(|d| d.as_seal());
|
||||
|
||||
let author = match AuthorGiven::find_author(pre_runtime_digests) {
|
||||
None => return Err("no author"),
|
||||
Some(author) => author,
|
||||
};
|
||||
let author = AuthorGiven::find_author(pre_runtime_digests).ok_or_else(|| "no author")?;
|
||||
|
||||
for (id, seal) in seals {
|
||||
if id == TEST_ID {
|
||||
|
||||
Reference in New Issue
Block a user