We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9f35e11 commit 9c5df8fCopy full SHA for 9c5df8f
src/strnom.rs
@@ -262,16 +262,12 @@ macro_rules! option {
262
}
263
264
macro_rules! take_until_newline_or_eof {
265
- ($i:expr,) => {{
266
- if $i.len() == 0 {
267
- Ok(($i, ""))
268
- } else {
269
- match $i.find('\n') {
270
- Some(i) => Ok(($i.advance(i), &$i.rest[..i])),
271
- None => Ok(($i.advance($i.len()), &$i.rest[..$i.len()])),
272
- }
+ ($i:expr,) => {
+ match $i.find('\n') {
+ Some(i) => Ok(($i.advance(i), &$i.rest[..i])),
+ None => Ok(($i.advance($i.len()), &$i.rest[..$i.len()])),
273
274
- }};
+ };
275
276
277
macro_rules! pair {
0 commit comments