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;
}
}
}
/// The method by which one or more hashes were supplied to verify the calculated digest
+#[derive(Debug, PartialEq)]
pub enum VerificationSource {
CommandArgument,
Clipboard,
}
/// A possible hash to match against. The algorithm is assumed.
+#[derive(Debug, PartialEq)]
pub struct CandidateHash {
bytes: Vec<u8>,
filename: Option<String>,
/// 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<CandidateHash>,