Skip to content

Commit

Permalink
chore: fix some clippy lints/update dependencies
Browse files Browse the repository at this point in the history
Signed-off-by: Ismael González <[email protected]>
  • Loading branch information
ismaelgv committed Dec 6, 2021
1 parent d1d1b9a commit f462368
Show file tree
Hide file tree
Showing 7 changed files with 106 additions and 116 deletions.
139 changes: 62 additions & 77 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ fn parse_arguments() -> Result<Config, String> {
match matches.value_of("color").unwrap_or("auto") {
"always" => Printer::color(),
"never" => Printer::no_color(),
"auto" | _ => detect_output_color(),
_ => detect_output_color(), // Ignore non-valid values and use auto.
}
};

Expand Down
4 changes: 2 additions & 2 deletions src/dumpfile.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use error::*;
use serde_json;
use solver::{Operation, Operations};
use std::fs::File;
use std::path::PathBuf;
use std::path::Path;

/// Dump operations intto file in JSON format
pub fn dump_to_file(operations: &[Operation]) -> Result<()> {
Expand Down Expand Up @@ -36,7 +36,7 @@ pub fn dump_to_file(operations: &[Operation]) -> Result<()> {
}

/// Read operations from a dump file and generate a Operations vector
pub fn read_from_file(filepath: &PathBuf) -> Result<Operations> {
pub fn read_from_file(filepath: &Path) -> Result<Operations> {
let file = match File::open(&filepath) {
Ok(file) => file,
Err(_) => {
Expand Down
Loading

0 comments on commit f462368

Please sign in to comment.