Skip to content

Commit eab02b6

Browse files
committed
rustfmt
1 parent f15a56d commit eab02b6

File tree

1 file changed

+16
-13
lines changed

1 file changed

+16
-13
lines changed

ui_test/src/comments.rs

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -184,19 +184,22 @@ impl Comments {
184184

185185
fn parse_command(&mut self, command: &str, l: usize) -> Result<()> {
186186
// Commands are letters or dashes, grab everything until the first character that is neither of those.
187-
let (command, args) = match command.chars().position(|c: char| !c.is_alphabetic() && c != '-') {
188-
None => (command, ""),
189-
Some(i) => {
190-
let (command, args) = command.split_at(i);
191-
let mut args = args.chars();
192-
let next = args.next().expect("the `position` above guarantees that there is at least one char");
193-
let args = match next {
194-
':' | ' ' => args.as_str(),
195-
_ => bail!("expected space or `:`, got `{next}`"),
196-
};
197-
(command, args)
198-
}
199-
};
187+
let (command, args) =
188+
match command.chars().position(|c: char| !c.is_alphabetic() && c != '-') {
189+
None => (command, ""),
190+
Some(i) => {
191+
let (command, args) = command.split_at(i);
192+
let mut args = args.chars();
193+
let next = args
194+
.next()
195+
.expect("the `position` above guarantees that there is at least one char");
196+
let args = match next {
197+
':' | ' ' => args.as_str(),
198+
_ => bail!("expected space or `:`, got `{next}`"),
199+
};
200+
(command, args)
201+
}
202+
};
200203

201204
match command {
202205
"revisions" => {

0 commit comments

Comments
 (0)