Fix latest clippy warnings (#3049)

This commit is contained in:
Jonathan Turner
2021-02-12 23:13:14 +13:00
committed by GitHub
parent 041086d22a
commit 5481db4079
213 changed files with 334 additions and 375 deletions

View File

@ -163,7 +163,6 @@ pub fn scan(
None
}
}).map(|p| p.build())
.filter_map(Result::ok)
.collect::<Vec<crate::whole_stream_command::Command>>();
plugins.extend(plugs);
}

View File

@ -31,10 +31,10 @@ enum PluginCommand {
}
impl PluginCommand {
fn command(self) -> Result<crate::whole_stream_command::Command, ShellError> {
fn command(self) -> crate::whole_stream_command::Command {
match self {
PluginCommand::Filter(cmd) => Ok(whole_stream_command(cmd)),
PluginCommand::Sink(cmd) => Ok(whole_stream_command(cmd)),
PluginCommand::Filter(cmd) => whole_stream_command(cmd),
PluginCommand::Sink(cmd) => whole_stream_command(cmd),
}
}
}
@ -71,7 +71,7 @@ impl PluginCommandBuilder {
}
}
pub fn build(&self) -> Result<crate::whole_stream_command::Command, ShellError> {
pub fn build(&self) -> crate::whole_stream_command::Command {
let mode = &self.mode;
let name = self.name.clone();