Skip to content

Commit

Permalink
fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
Ifropc committed Feb 12, 2025
1 parent a80e3d2 commit 730cdf6
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
11 changes: 6 additions & 5 deletions src/cli/decode.rs
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
use clap::{Args, ValueEnum};
use serde::Serialize;
use std::ffi::OsString;
use std::io::{Cursor, ErrorKind};
use std::{
fmt::Debug,
fs::File,
io::{stdin, Read},
str::FromStr,
};
use std::ffi::OsString;
use std::io::{Cursor, ErrorKind};
use clap::{Args, ValueEnum};
use serde::Serialize;

use crate::cli::{skip_whitespace::SkipWhitespace, Channel};

Expand Down Expand Up @@ -141,7 +141,8 @@ impl Cmd {
if self.input.is_empty() {
Ok(vec![Box::new(stdin())])
} else {
Ok(self.input
Ok(self
.input
.iter()
.map(|input| match File::open(input) {
Ok(file) => Ok::<Box<dyn Read>, Error>(Box::new(file) as Box<dyn Read>),
Expand Down
9 changes: 5 additions & 4 deletions src/cli/encode.rs
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
use clap::{Args, ValueEnum};
use std::ffi::OsString;
use std::io::{Cursor, ErrorKind};
use std::{
fs::File,
io::{stdin, stdout, Read, Write},
str::FromStr,
};
use std::ffi::OsString;
use std::io::{Cursor, ErrorKind};
use clap::{Args, ValueEnum};

use crate::cli::Channel;

Expand Down Expand Up @@ -172,7 +172,8 @@ impl Cmd {
if self.input.is_empty() {
Ok(vec![Box::new(stdin())])
} else {
Ok(self.input
Ok(self
.input
.iter()
.map(|input| match File::open(input) {
Ok(file) => Ok::<Box<dyn Read>, Error>(Box::new(file) as Box<dyn Read>),
Expand Down

0 comments on commit 730cdf6

Please sign in to comment.