X-Git-Url: https://code.octet-stream.net/hashgood/blobdiff_plain/18630e80189942b821fbe5502572acc21bb0543e..3036c7308170f6c68961e44e61e06727eef78327:/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()));