Format with rustfmt 0.4.1
diff --git a/src/strnom.rs b/src/strnom.rs
index dbac5c9..1fddcd0 100644
--- a/src/strnom.rs
+++ b/src/strnom.rs
@@ -1,6 +1,6 @@
//! Adapted from [`nom`](https://github.com/Geal/nom).
-use std::str::{Chars, CharIndices, Bytes};
+use std::str::{Bytes, CharIndices, Chars};
use unicode_xid::UnicodeXID;
@@ -73,8 +73,9 @@
while i < bytes.len() {
let s = input.advance(i);
if bytes[i] == b'/' {
- if s.starts_with("//") && (!s.starts_with("///") || s.starts_with("////")) &&
- !s.starts_with("//!") {
+ if s.starts_with("//") && (!s.starts_with("///") || s.starts_with("////"))
+ && !s.starts_with("//!")
+ {
if let Some(len) = s.find('\n') {
i += len + 1;
continue;
@@ -82,9 +83,10 @@
break;
} else if s.starts_with("/**/") {
i += 4;
- continue
- } else if s.starts_with("/*") && (!s.starts_with("/**") || s.starts_with("/***")) &&
- !s.starts_with("/*!") {
+ continue;
+ } else if s.starts_with("/*") && (!s.starts_with("/**") || s.starts_with("/***"))
+ && !s.starts_with("/*!")
+ {
let (_, com) = block_comment(s)?;
i += com.len();
continue;
@@ -104,11 +106,7 @@
}
}
}
- return if i > 0 {
- Ok((s, ()))
- } else {
- Err(LexError)
- };
+ return if i > 0 { Ok((s, ())) } else { Err(LexError) };
}
Ok((input.advance(input.len()), ()))
}
@@ -270,7 +268,7 @@
} else {
match $i.find('\n') {
Some(i) => Ok(($i.advance(i), &$i.rest[..i])),
- None => Ok(($i.advance($i.len()), ""))
+ None => Ok(($i.advance($i.len()), "")),
}
}
}};
@@ -395,7 +393,7 @@
macro_rules! many0 {
($i:expr, $f:expr) => {{
let ret;
- let mut res = ::std::vec::Vec::new();
+ let mut res = ::std::vec::Vec::new();
let mut input = $i;
loop {