1
Fork 0

Simplify CaptureState::inner_attr_ranges.

The `Option`s within the `ReplaceRange`s within the hashmap are always
`None`. This PR omits them and inserts them when they are extracted from
the hashmap.
This commit is contained in:
Nicholas Nethercote 2024-07-12 15:47:16 +10:00
parent 3d68afc9e8
commit 757f73f506
3 changed files with 5 additions and 5 deletions

View file

@ -225,7 +225,7 @@ enum Capturing {
struct CaptureState {
capturing: Capturing,
replace_ranges: Vec<ReplaceRange>,
inner_attr_ranges: FxHashMap<AttrId, ReplaceRange>,
inner_attr_ranges: FxHashMap<AttrId, Range<u32>>,
}
/// Iterator over a `TokenStream` that produces `Token`s. It's a bit odd that