Skip to content

Commit

Permalink
Simplify default erasing
Browse files Browse the repository at this point in the history
  • Loading branch information
dtolnay committed Aug 28, 2020
1 parent 571527c commit 8288d9d
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/expand.rs
Original file line number Diff line number Diff line change
Expand Up @@ -286,12 +286,8 @@ fn transform_block(
let mut outer_generics = generics.clone();
for p in &mut outer_generics.params {
match p {
GenericParam::Type(t) => {
let _ = t.default.take();
}
GenericParam::Const(c) => {
let _ = c.default.take();
}
GenericParam::Type(t) => t.default = None,
GenericParam::Const(c) => c.default = None,
GenericParam::Lifetime(_) => {}
}
}
Expand Down

0 comments on commit 8288d9d

Please sign in to comment.