aboutsummaryrefslogtreecommitdiff
path: root/src/spans.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/spans.rs')
-rw-r--r--src/spans.rs5
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(_)) => {