diff options
author | Martin Fischer <martin@push-f.com> | 2021-12-03 10:07:22 +0100 |
---|---|---|
committer | Martin Fischer <martin@push-f.com> | 2021-12-05 02:52:36 +0100 |
commit | 0b32dce1dad570268a641e07c003913bdde4c54e (patch) | |
tree | 81003701f2a20ed11749377ab816785f137b382d /src | |
parent | 2c5284aacb91e5d3aaa729f4319e368296b1d47d (diff) |
improve duplicate attribute span
Diffstat (limited to 'src')
-rw-r--r-- | src/spans.rs | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/spans.rs b/src/spans.rs index ac87751..2107f20 100644 --- a/src/spans.rs +++ b/src/spans.rs @@ -93,9 +93,8 @@ impl<R: GetPos> SpanEmitter<R> { Entry::Vacant(vacant) => { vacant.insert(v); } - Entry::Occupied(occupied) => { - let span = occupied.get().name_span.clone(); - self.emit_error_span(Error::DuplicateAttribute, span); + Entry::Occupied(_) => { + self.emit_error_span(Error::DuplicateAttribute, v.name_span); } }, Some(Token::EndTag(_)) => { |