From 14512703727ead78880012ed43290c5ebee21158 Mon Sep 17 00:00:00 2001 From: GnomedDev Date: Sat, 3 Feb 2024 17:22:45 +0000 Subject: [PATCH] Remove unused Subtree::visit_ids function --- crates/tt/src/lib.rs | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/crates/tt/src/lib.rs b/crates/tt/src/lib.rs index b3b0eeda75a..83681c53397 100644 --- a/crates/tt/src/lib.rs +++ b/crates/tt/src/lib.rs @@ -76,19 +76,6 @@ impl Subtree { pub const fn empty(span: DelimSpan) -> Self { Subtree { delimiter: Delimiter::invisible_delim_spanned(span), token_trees: vec![] } } - - pub fn visit_ids(&mut self, f: &mut impl FnMut(S) -> S) { - self.delimiter.open = f(self.delimiter.open); - self.delimiter.close = f(self.delimiter.close); - self.token_trees.iter_mut().for_each(|tt| match tt { - crate::TokenTree::Leaf(leaf) => match leaf { - crate::Leaf::Literal(it) => it.span = f(it.span), - crate::Leaf::Punct(it) => it.span = f(it.span), - crate::Leaf::Ident(it) => it.span = f(it.span), - }, - crate::TokenTree::Subtree(s) => s.visit_ids(f), - }) - } } #[derive(Debug, Copy, Clone, PartialEq)]