Skip to content

Commit 2cb555c

Browse files
committed
Remove noop slicing from take_until_newline_or_eof
1 parent 9c5df8f commit 2cb555c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/strnom.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@ macro_rules! take_until_newline_or_eof {
265265
($i:expr,) => {
266266
match $i.find('\n') {
267267
Some(i) => Ok(($i.advance(i), &$i.rest[..i])),
268-
None => Ok(($i.advance($i.len()), &$i.rest[..$i.len()])),
268+
None => Ok(($i.advance($i.len()), $i.rest)),
269269
}
270270
};
271271
}

0 commit comments

Comments
 (0)