Skip to content

Commit 1c7f753

Browse files
committed
Use segments_span() for overall package path span calculation.
1 parent 4995bd4 commit 1c7f753

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

crates/wac-parser/src/ast/import.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ impl PackagePath<'_> {
122122
let end = if let Some((_, version)) = &self.version {
123123
version.0.end()
124124
} else {
125-
self.segments.last().unwrap().1 .0.end()
125+
self.segments_span().end()
126126
};
127127

128128
Span::new(span.get_input(), span.start(), end).unwrap()

0 commit comments

Comments
 (0)