mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-05-29 18:51:15 -03:00
Fix some unused-ControlFlow warnings
This commit is contained in:
@@ -656,7 +656,8 @@ fn index_mut(&mut self, index: usize) -> &mut Self::Output {
|
||||
impl Acceptor for $name {
|
||||
#[allow(unused_variables)]
|
||||
fn accept<'a>(&'a self, visitor: &mut dyn NodeVisitor<'a>, reversed: bool) {
|
||||
accept_list_visitor!(Self, accept, visit, self, visitor, reversed, $contents);
|
||||
let _ =
|
||||
accept_list_visitor!(Self, accept, visit, self, visitor, reversed, $contents);
|
||||
}
|
||||
}
|
||||
impl AcceptorMut for $name {
|
||||
@@ -743,7 +744,7 @@ macro_rules! implement_acceptor_for_branch {
|
||||
impl Acceptor for $name {
|
||||
#[allow(unused_variables)]
|
||||
fn accept<'a>(&'a self, visitor: &mut dyn NodeVisitor<'a>, reversed: bool){
|
||||
visitor_accept_field!(
|
||||
let _ = visitor_accept_field!(
|
||||
Self,
|
||||
accept,
|
||||
visit,
|
||||
@@ -3718,7 +3719,7 @@ fn allocate<T: NodeMut + Default>(&self) -> Box<T> {
|
||||
// Return the resulting Node pointer. It is never null.
|
||||
fn allocate_visit<T: NodeMut + Default>(&mut self) -> Box<T> {
|
||||
let mut result = Box::<T>::default();
|
||||
self.visit_mut(&mut *result);
|
||||
let _ = self.visit_mut(&mut *result);
|
||||
result
|
||||
}
|
||||
|
||||
|
||||
@@ -980,7 +980,7 @@ pub fn reader_execute_readline_cmd(parser: &Parser, ch: CharEvent) {
|
||||
data.rls = Some(ReadlineLoopState::new());
|
||||
}
|
||||
data.save_screen_state();
|
||||
data.handle_char_event(Some(ch));
|
||||
let _ = data.handle_char_event(Some(ch));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user