mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-05-30 11:21:15 -03:00
ast: Remove as_mut_leaf
This was unused.
This commit is contained in:
15
src/ast.rs
15
src/ast.rs
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user