Skip to content
Myr

Fix clippy warning

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by David Peter · committed by David Peter · parent 2d0cd4b · Browse files · 2 files+4 added−2 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

2 files+4 added−2 removed

  • other:+4 added−2 removed

2 files+4 added−2 removed

modified:src/command.rs+1 added-1 removed
207 unmodified lines
208 pub fn iter(&self) -> impl Iterator<Item = &Command<'a>> {209 self.0.iter()210 }211212 pub fn len(&self) -> usize {212 pub fn num_commands(&self) -> usize {213 self.0.len()214 }215216 /// Finds all the strings that appear multiple times in the input iterator, returning them in
303 unmodified lines
modified:src/options.rs+3 added-1 removed
20 unmodified lines
21#[derive(Debug)]22pub enum Shell {23 /// Default shell command24 Default(&'static str),2526 /// Custom shell command specified via --shell27 Custom(Vec<String>),28}29
234 unmodified lines
264265 pub fn validate_against_command_list(&self, commands: &Commands) -> Result<()> {266 if let Some(preparation_command) = &self.preparation_command {267 ensure!(267 preparation_command.len() <= 1 || commands.len() == preparation_command.len(),268 preparation_command.len() <= 1269 || commands.num_commands() == preparation_command.len(),270 "The '--prepare' option has to be provided just once or N times, where N is the \271 number of benchmark commands."272 );273 }
51 unmodified lines