Skip to content
Myr

Fix clippy suggestions

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 2dfc919 · Browse files · 1 file+4 added−14 removed
This commit

State

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

Diff stats

1 file+4 added−14 removed

  • other:+4 added−14 removed

1 file+4 added−14 removed

modified:src/options.rs+4 added-14 removed
108 unmodified lines
109 RunBounds { min: 10, max: None }110 }111}112113#[derive(Debug, Clone, PartialEq)]113#[derive(Debug, Default, Clone, PartialEq)]114pub enum CommandInputPolicy {115 /// Read from the null device116 #[default]117 Null,118119 /// Read input from a file120 File(PathBuf),121}122122impl Default for CommandInputPolicy {123 fn default() -> Self {124 CommandInputPolicy::Null125 }126}127123impl CommandInputPolicy {124 pub fn get_stdin(&self) -> io::Result<Stdio> {125 let stream: Stdio = match self {126 CommandInputPolicy::Null => Stdio::null(),
8 unmodified lines
135 }136}137138/// How to handle the output of benchmarked commands144#[derive(Debug, Clone, PartialEq, Eq)]139#[derive(Debug, Clone, PartialEq, Eq, Default)]140pub enum CommandOutputPolicy {141 /// Redirect output to the null device142 #[default]143 Null,144145 /// Feed output through a pipe before discarding it146 Pipe,
4 unmodified lines
151 /// Show command output on the terminal152 Inherit,153}154159impl Default for CommandOutputPolicy {160 fn default() -> Self {161 CommandOutputPolicy::Null162 }163}164155impl CommandOutputPolicy {156 pub fn get_stdout_stderr(&self) -> io::Result<(Stdio, Stdio)> {157 let streams = match self {158 CommandOutputPolicy::Null => (Stdio::null(), Stdio::null()),
294 unmodified lines