From 63e42bb5bdd57b8b0155d9e38ebe78e0e864c4d5 Mon Sep 17 00:00:00 2001 From: Edwin Cheng Date: Tue, 5 Nov 2019 00:16:03 +0800 Subject: [PATCH] Change to better naming --- crates/ra_mbe/src/lib.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/crates/ra_mbe/src/lib.rs b/crates/ra_mbe/src/lib.rs index 7d4a5f307e..f511492580 100644 --- a/crates/ra_mbe/src/lib.rs +++ b/crates/ra_mbe/src/lib.rs @@ -72,7 +72,7 @@ fn find_subtree_shift(tt: &tt::Subtree, mut cur: Option) -> Option { } /// Shift given TokenTree token id -fn shift_token_tree(tt: &mut tt::Subtree, shift: u32) { +fn shift_subtree(tt: &mut tt::Subtree, shift: u32) { for t in tt.token_trees.iter_mut() { match t { tt::TokenTree::Leaf(leaf) => match leaf { @@ -83,7 +83,7 @@ fn shift_token_tree(tt: &mut tt::Subtree, shift: u32) { } _ => (), }, - tt::TokenTree::Subtree(tt) => shift_token_tree(tt, shift), + tt::TokenTree::Subtree(tt) => shift_subtree(tt, shift), } } } @@ -117,7 +117,7 @@ impl MacroRules { // apply shift let mut tt = tt.clone(); if let Some(shift) = self.shift { - shift_token_tree(&mut tt, shift) + shift_subtree(&mut tt, shift) } mbe_expander::expand(self, &tt)