diff options
-rw-r--r-- | src/spans.rs | 5 | ||||
-rw-r--r-- | tests/span-tests/demo.out | 2 |
2 files changed, 3 insertions, 4 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(_)) => { diff --git a/tests/span-tests/demo.out b/tests/span-tests/demo.out index 37ab8be..22513f7 100644 --- a/tests/span-tests/demo.out +++ b/tests/span-tests/demo.out @@ -23,7 +23,7 @@ note: │ ^ unknown-named-character-reference 12 │ 13 │ Does this open two pages? <a href=foo.html href=bar.html>click me</a> - │ ^^^^ duplicate-attribute + │ ^^^^ duplicate-attribute 14 │ 15 │ Do you start or do you end? </yes/> │ ^ end-tag-with-trailing-solidus |