Skip to content

Commit 1e8e96f

Browse files
committed
Remove unnecessarily verbose output
1 parent 099d914 commit 1e8e96f

File tree

1 file changed

+4
-14
lines changed

1 file changed

+4
-14
lines changed

src/cli/dtx.rs

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -166,33 +166,23 @@ impl Command {
166166
Ok(())
167167
}
168168

169-
fn get_device_mode(&self, m: &clap::ArgMatches) -> Result<()> {
169+
fn get_device_mode(&self, _m: &clap::ArgMatches) -> Result<()> {
170170
let mode = sys::dtx::Device::open()
171171
.context("Failed to open DTX device")?
172172
.get_device_mode()
173173
.context("Failed to get device mode")?;
174174

175-
if !m.is_present("quiet") {
176-
println!("Device is in '{}' mode", mode);
177-
} else {
178-
println!("{}", mode);
179-
}
180-
175+
println!("{}", mode);
181176
Ok(())
182177
}
183178

184-
fn get_latch_status(&self, m: &clap::ArgMatches) -> Result<()> {
179+
fn get_latch_status(&self, _m: &clap::ArgMatches) -> Result<()> {
185180
let status = sys::dtx::Device::open()
186181
.context("Failed to open DTX device")?
187182
.get_latch_status()
188183
.context("Failed to get latch status")?;
189184

190-
if !m.is_present("quiet") {
191-
println!("Latch has been '{}'", status);
192-
} else {
193-
println!("{}", status);
194-
}
195-
185+
println!("{}", status);
196186
Ok(())
197187
}
198188

0 commit comments

Comments
 (0)