[Rhetorical question:] Is this a function/method call or a Enum-tuple?
let pairs = RymParser::parse(Rule::rym, &source);
It’s a method call in this case, and maybe seasoned Rustaceans can spot that immediately, but the use of parentheses for tuples does tend to lead to being ‘blinded by brackets’. I’d like to suggest that spaces are always used between the insides of the tuple parentheses; i.e.
// if this were an enum
let pairs = RymParser::parse( Rule::rym, &source );
This would mimic the behaviour of struct instances somestruct { ... }.
This may have the undesirable effect of adding too many spaces where not desired (are Ok & Err tuples?)
Rule::int_number => match pair.as_str().parse::<u64>() {
Err( e ) => Err( new_error(ErrorKind::ParseInt(e)) ),
Ok( i ) => Ok( i ),
},
But then the lint could perhaps apply only to fully-qualified tuples (with the module::tuple or enum::tuple format)
You’ll have to forgive my ignorance if this is not possible / out of the question / already been discussed and turned down, I’m new to Rust.