1
Fork 0

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:
Josh Stone 2020-04-24 13:58:41 -07:00
parent 3360cc3a0e
commit 2325c20925
21 changed files with 111 additions and 64 deletions

View file

@ -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;
}
}