Skip to content

Commit 2e9ae26

Browse files
committed
Fix: Path::tail
1 parent 06d6f43 commit 2e9ae26

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

crates/binjs_shared/src/ast.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ impl<I, F> Path<I, F> where I: Debug + PartialEq, F: Debug + PartialEq {
161161
/// If there are fewer than `len` elements, return
162162
/// as many elements as possible.
163163
pub fn tail(&self, len: usize) -> &[PathItem<I, F>] {
164-
if len >= self.len() {
164+
if len < self.len() {
165165
&self.items[self.len() - len..]
166166
} else {
167167
&self.items

0 commit comments

Comments
 (0)