Skip to content

Commit

Permalink
Clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
Rantanen committed Sep 6, 2022
1 parent 22b9e21 commit 1acc0e2
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -270,12 +270,12 @@ impl ConnectionOptions

let mut cert_data = String::new();
let mut key_data = String::new();
File::open(&cert)
File::open(cert)
.and_then(|mut file| file.read_to_string(&mut cert_data))
.map_err(|_| Error::ArgumentError {
msg: format!("Could not read CA certificate: '{}'", cert),
})?;
File::open(&key)
File::open(key)
.and_then(|mut file| file.read_to_string(&mut key_data))
.map_err(|_| Error::ArgumentError {
msg: format!("Could not read CA private key: '{}'", key),
Expand Down
2 changes: 1 addition & 1 deletion src/session/serialization.rs
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ pub fn open_target_file(
{
let mut file: Box<dyn Write> = match filename {
"-" => Box::new(std::io::stdout()),
_ => match std::fs::File::create(&filename) {
_ => match std::fs::File::create(filename) {
Ok(f) => Box::new(f),
Err(e) => {
return Err(SerializationError::IoError {
Expand Down
2 changes: 1 addition & 1 deletion src/ui/commands/colon_command.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ pub fn create_app() -> App<'static>
.short('f')
.long("format")
.takes_value(true)
.possible_values(&["msgpack", "json"]),
.possible_values(["msgpack", "json"]),
),
)
}
Expand Down

0 comments on commit 1acc0e2

Please sign in to comment.