1
Fork 0

range(a, b).foo() -> (a..b).foo()

sed -i 's/ range(\([^,]*\), *\([^()]*\))\./ (\1\.\.\2)\./g' **/*.rs
This commit is contained in:
Jorge Aparicio 2015-01-26 15:44:22 -05:00
parent bedd8108dc
commit c300d681bd
55 changed files with 122 additions and 122 deletions

View file

@ -166,7 +166,7 @@ pub fn count_names(ms: &[TokenTree]) -> usize {
pub fn initial_matcher_pos(ms: Rc<Vec<TokenTree>>, sep: Option<Token>, lo: BytePos)
-> Box<MatcherPos> {
let match_idx_hi = count_names(&ms[]);
let matches: Vec<_> = range(0, match_idx_hi).map(|_| Vec::new()).collect();
let matches: Vec<_> = (0..match_idx_hi).map(|_| Vec::new()).collect();
box MatcherPos {
stack: vec![],
top_elts: TtSeq(ms),