Skip to content

Commit 9979935

Browse files
committed
rustfmt
1 parent 54f907f commit 9979935

File tree

3 files changed

+14
-14
lines changed

3 files changed

+14
-14
lines changed

cfgrammar/src/lib/yacc/parser.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -460,8 +460,8 @@ impl YaccParser {
460460
} else {
461461
return Err(YaccGrammarError {
462462
kind: YaccGrammarErrorKind::InvalidGrmtoolsHeaderKey,
463-
spans: vec![Span::new(i, i)]
464-
})
463+
spans: vec![Span::new(i, i)],
464+
});
465465
}
466466
let val_end_pos = self.parse_yacckind(i, update_yacc_kind)?;
467467
if let Some(orig) = yacc_kind_key_span {
@@ -476,9 +476,9 @@ impl YaccParser {
476476
}
477477
if let Some(j) = self.lookahead_is(",", i) {
478478
i = self.parse_ws(j, true)?;
479-
continue
479+
continue;
480480
} else {
481-
break
481+
break;
482482
}
483483
} else {
484484
return Err(YaccGrammarError {
@@ -2885,8 +2885,8 @@ B";
28852885
Start -> () : ;
28862886
"#;
28872887
YaccParser::new(YaccKindResolver::NoDefault, src.to_string())
2888-
.parse()
2889-
.unwrap();
2888+
.parse()
2889+
.unwrap();
28902890
let src = r#"
28912891
%grmtools{
28922892
yacckind: YaccKind::Grmtools
@@ -2895,8 +2895,8 @@ B";
28952895
Start -> () : ;
28962896
"#;
28972897
YaccParser::new(YaccKindResolver::NoDefault, src.to_string())
2898-
.parse()
2899-
.unwrap();
2898+
.parse()
2899+
.unwrap();
29002900
}
29012901

29022902
#[test]

lrlex/src/lib/parser.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1924,10 +1924,10 @@ b "A"
19241924
3,
19251925
3,
19261926
);
1927-
// The following is missing comma separators for more than 2 elements
1928-
// This is to avoid parsing it as "key value" number of elements.
1929-
// However we actually error after the first element since the parser
1930-
// knows "case_insensitive" is a flag with no arguments.
1927+
// The following is missing comma separators for more than 2 elements
1928+
// This is to avoid parsing it as "key value" number of elements.
1929+
// However we actually error after the first element since the parser
1930+
// knows "case_insensitive" is a flag with no arguments.
19311931
let src = r#"
19321932
%grmtools {unicode, case_insensitive posix_escapes allow_comments}
19331933
%%

lrpar/cttests/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -319,10 +319,10 @@ fn test_expect() {
319319
#[test]
320320
fn test_grmtools_section_files() {
321321
use glob::glob;
322+
use std::env;
322323
use std::fs::File;
323-
use std::io::{BufRead as _, Read as _};
324324
use std::io::BufReader;
325-
use std::env;
325+
use std::io::{BufRead as _, Read as _};
326326

327327
let manifest_dir = env::var("CARGO_MANIFEST_DIR").unwrap();
328328
let examples_glob = format!("{manifest_dir}/../examples/**");

0 commit comments

Comments
 (0)