X-Git-Url: https://code.octet-stream.net/hashgood/blobdiff_plain/2d750bf20797d9f7eaf838296ac878f97f6b6846..b237f9d12de2062843975400c85dcad05bf4065c:/src/calculate.rs?ds=inline diff --git a/src/calculate.rs b/src/calculate.rs index dc059b2..59395d3 100644 --- a/src/calculate.rs +++ b/src/calculate.rs @@ -8,7 +8,7 @@ use crypto::sha2::Sha256; use std::error::Error; use std::fs::File; use std::io::prelude::*; -use std::path::PathBuf; +use std::path::Path; use std::sync::Arc; use std::thread; use std::thread::JoinHandle; @@ -16,7 +16,7 @@ use std::thread::JoinHandle; pub type CalculateResult = Result)>, Box>; /// For a given path to the input (may be "-" for STDIN), try to obtain a reader for the data within it. -pub fn get_input_reader(input: &PathBuf) -> Result, String> { +pub fn get_input_reader(input: &Path) -> Result, String> { if input.to_str() == Some("-") { // Special case: standard input return Ok(Box::new(std::io::stdin()));