From 0b32dce1dad570268a641e07c003913bdde4c54e Mon Sep 17 00:00:00 2001 From: Martin Fischer Date: Fri, 3 Dec 2021 10:07:22 +0100 Subject: improve duplicate attribute span --- src/spans.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src') 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 SpanEmitter { 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(_)) => { -- cgit v1.2.3