ast: Remove as_mut_leaf

This was unused.
This commit is contained in:
Peter Ammon
2025-04-26 14:54:49 -07:00
parent e05ecd6c7d
commit 0348389195

View File

@@ -333,9 +333,6 @@ fn as_job_list(&self) -> Option<&JobList> {
#[allow(unused)]
trait ConcreteNodeMut {
// Cast to any sub-trait.
fn as_mut_leaf(&mut self) -> Option<&mut dyn Leaf> {
None
}
fn as_mut_keyword(&mut self) -> Option<&mut dyn Keyword> {
None
}
@@ -551,9 +548,6 @@ fn as_keyword(&self) -> Option<&dyn Keyword> {
}
}
impl ConcreteNodeMut for $name {
fn as_mut_leaf(&mut self) -> Option<&mut dyn Leaf> {
Some(self)
}
fn as_mut_keyword(&mut self) -> Option<&mut dyn Keyword> {
Some(self)
}
@@ -591,9 +585,6 @@ fn as_token(&self) -> Option<&dyn Token> {
}
}
impl ConcreteNodeMut for $name {
fn as_mut_leaf(&mut self) -> Option<&mut dyn Leaf> {
Some(self)
}
fn as_mut_token(&mut self) -> Option<&mut dyn Token> {
Some(self)
}
@@ -1801,9 +1792,6 @@ fn as_maybe_newlines(&self) -> Option<&MaybeNewlines> {
}
}
impl ConcreteNodeMut for MaybeNewlines {
fn as_mut_leaf(&mut self) -> Option<&mut dyn Leaf> {
Some(self)
}
fn as_mut_maybe_newlines(&mut self) -> Option<&mut MaybeNewlines> {
Some(self)
}
@@ -1826,9 +1814,6 @@ fn as_argument(&self) -> Option<&Argument> {
}
}
impl ConcreteNodeMut for Argument {
fn as_mut_leaf(&mut self) -> Option<&mut dyn Leaf> {
Some(self)
}
fn as_mut_argument(&mut self) -> Option<&mut Argument> {
Some(self)
}