File tree Expand file tree Collapse file tree 1 file changed +16
-13
lines changed Expand file tree Collapse file tree 1 file changed +16
-13
lines changed Original file line number Diff line number Diff line change @@ -184,19 +184,22 @@ impl Comments {
184
184
185
185
fn parse_command ( & mut self , command : & str , l : usize ) -> Result < ( ) > {
186
186
// 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
+ } ;
200
203
201
204
match command {
202
205
"revisions" => {
You can’t perform that action at this time.
0 commit comments