Browse Source

Updating to the latest Rust + dependencies

develop
Drew Short 8 years ago
parent
commit
f3d8396873
  1. 17
      Cargo.toml
  2. 2
      src/cache.rs
  3. 4
      src/main.rs

17
Cargo.toml

@ -20,12 +20,13 @@ default = []
bench = []
[dependencies]
libc = "0.2.10"
libc = "0.2.17"
rustc-serialize = "0.3.19"
dft = "0.4.3"
image = "0.9.0"
num = "0.1.32"
docopt = "0.6.80"
flate2 = "0.2.13"
sha1 = "0.1.1"
criterion-stats = "0.1.0"
dft = "0.5.2"
image = "0.10.3"
num = "0.1.36"
docopt = "0.6.86"
flate2 = "0.2.14"
sha1 = "0.2.0"
#criterion = { git = "https://github.com/japaric/criterion.rs" }
log = "0.3.6"

2
src/cache.rs

@ -140,7 +140,7 @@ impl<'a> Cache<'a> {
let mut sha1 = Sha1::new();
sha1.update(&buf);
// Return the hex result of the hash
Ok(sha1.hexdigest())
Ok(sha1.digest().to_string())
}
/**

4
src/main.rs

@ -114,13 +114,13 @@ fn get_requested_perceptual_hashes<'a>(lib: &pihash::PIHash,
};
let dhash = if args.flag_dhash || flags_get_all_perceptual_hashes(&args) {
lib.get_ahash(&image_path)
lib.get_dhash(&image_path)
} else {
0u64
};
let phash = if args.flag_phash || flags_get_all_perceptual_hashes(&args) {
lib.get_ahash(&image_path)
lib.get_phash(&image_path)
} else {
0u64
};

Loading…
Cancel
Save