Skip to content

Commit 8482641

Browse files
authored
Merge pull request #480 from ltratt/manual_clippy_fixes
Manual clippy fixes.
2 parents 6907b54 + da3adf8 commit 8482641

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

cfgrammar/src/lib/yacc/parser.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -823,7 +823,7 @@ impl YaccParser {
823823
':' => {
824824
let k = j + ':'.len_utf8();
825825
if k == self.src.len() || !self.src[k..].starts_with(':') {
826-
return Ok((j, self.src[i..j].to_string()));
826+
return Ok((j, self.src[i..j].trim().to_string()));
827827
}
828828
j += 2 * ':'.len_utf8();
829829
}

lrpar/cttests/src/parseparam_copy.test

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,12 @@ grammar: |
99
// Since then we relaxed the bounds to require `Clone`.
1010
// This tests backwards compatibility of actions that
1111
// rely on the older copy bounds.
12-
'INT' { (move |_| {})(p); check_copy(p); p + $lexer.span_str($1.unwrap().span()).parse::<u64>().unwrap() }
12+
'INT' {
13+
#[allow(clippy::redundant_closure_call)]
14+
(move |_| {})(p);
15+
check_copy(p);
16+
p + $lexer.span_str($1.unwrap().span()).parse::<u64>().unwrap()
17+
}
1318
;
1419
%%
1520
fn check_copy<T: Copy>(_: T){}

0 commit comments

Comments
 (0)