Avoid unused Option::map results
These are changes that would be needed if we add `#[must_use]` to `Option::map`, per #71484.
This commit is contained in:
parent
3360cc3a0e
commit
2325c20925
21 changed files with 111 additions and 64 deletions
|
@ -94,7 +94,7 @@ impl TocBuilder {
|
|||
loop {
|
||||
match self.chain.pop() {
|
||||
Some(mut next) => {
|
||||
this.map(|e| next.children.entries.push(e));
|
||||
next.children.entries.extend(this);
|
||||
if next.level < level {
|
||||
// this is the parent we want, so return it to
|
||||
// its rightful place.
|
||||
|
@ -105,7 +105,7 @@ impl TocBuilder {
|
|||
}
|
||||
}
|
||||
None => {
|
||||
this.map(|e| self.top_level.entries.push(e));
|
||||
self.top_level.entries.extend(this);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue