X-Git-Url: https://code.octet-stream.net/hashgood/blobdiff_plain/a81302dca6183729495f32f396e4f7a793b89e96..e92fb6d7ae75915b4395686b721cf7d92841b994:/src/main.rs diff --git a/src/main.rs b/src/main.rs index a82c40a..2c7e189 100644 --- a/src/main.rs +++ b/src/main.rs @@ -39,10 +39,12 @@ pub struct Opt { impl Opt { fn get_paste(&self) -> bool { - #[cfg(feature = "paste")] { + #[cfg(feature = "paste")] + { return self.paste; } - #[cfg(not(feature = "paste"))] { + #[cfg(not(feature = "paste"))] + { return false; } } @@ -69,6 +71,7 @@ impl Algorithm { } /// The method by which one or more hashes were supplied to verify the calculated digest +#[derive(Debug, PartialEq)] pub enum VerificationSource { CommandArgument, Clipboard, @@ -100,6 +103,7 @@ impl Hash { } /// A possible hash to match against. The algorithm is assumed. +#[derive(Debug, PartialEq)] pub struct CandidateHash { bytes: Vec, filename: Option, @@ -107,6 +111,7 @@ pub struct CandidateHash { /// A list of candidate hashes that our input could potentially match. At this point it is /// assumed that we will be verifying a digest of a particular, single algorithm. +#[derive(Debug, PartialEq)] pub struct CandidateHashes { alg: Algorithm, hashes: Vec,