imageproc: Use DefaultHasher from stdlib instead of twox-hash
10
Cargo.lock
generated
|
@ -917,7 +917,6 @@ dependencies = [
|
|||
"rayon 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"regex 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"tera 0.11.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"twox-hash 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"utils 0.1.0",
|
||||
]
|
||||
|
||||
|
@ -2447,14 +2446,6 @@ dependencies = [
|
|||
"trust-dns-proto 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "twox-hash"
|
||||
version = "1.1.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"rand 0.3.22 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "ucd-util"
|
||||
version = "0.1.1"
|
||||
|
@ -2927,7 +2918,6 @@ dependencies = [
|
|||
"checksum trust-dns-proto 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "32d7c204ee231f802aa821f9dc2195aa0d0269ef7e9f8c844208565c9e3981e4"
|
||||
"checksum trust-dns-resolver 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)" = "9b0a0c9d4f8dd56481209c5ae1a8965ed022461d352c81fb92466ec9d846929e"
|
||||
"checksum trust-dns-resolver 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "28b094ad60c4f51f36a493201d04d6605183c62bd5f0c73008a732f23950c156"
|
||||
"checksum twox-hash 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "475352206e7a290c5fccc27624a163e8d0d115f7bb60ca18a64fc9ce056d7435"
|
||||
"checksum ucd-util 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "fd2be2d6639d0f8fe6cdda291ad456e23629558d466e2789d2c3e9892bda285d"
|
||||
"checksum unicase 1.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7f4765f83163b74f957c797ad9253caf97f103fb064d3999aea9568d09fc8a33"
|
||||
"checksum unicase 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "284b6d3db520d67fbe88fd778c21510d1b0ba4a551e5d0fbb023d33405f6de8a"
|
||||
|
|
|
@ -9,7 +9,6 @@ regex = "1.0"
|
|||
tera = "0.11.0"
|
||||
image = "0.19.0"
|
||||
rayon = "0.9"
|
||||
twox-hash = "1.1"
|
||||
|
||||
errors = { path = "../errors" }
|
||||
utils = { path = "../utils" }
|
||||
|
|
|
@ -3,7 +3,6 @@ extern crate lazy_static;
|
|||
extern crate regex;
|
||||
extern crate image;
|
||||
extern crate rayon;
|
||||
extern crate twox_hash;
|
||||
|
||||
extern crate utils;
|
||||
extern crate errors;
|
||||
|
@ -12,13 +11,13 @@ use std::path::{Path, PathBuf};
|
|||
use std::hash::{Hash, Hasher};
|
||||
use std::collections::HashMap;
|
||||
use std::collections::hash_map::Entry as HEntry;
|
||||
use std::collections::hash_map::DefaultHasher;
|
||||
use std::fs::{self, File};
|
||||
|
||||
use regex::Regex;
|
||||
use image::{GenericImage, FilterType};
|
||||
use image::jpeg::JPEGEncoder;
|
||||
use rayon::prelude::*;
|
||||
use twox_hash::XxHash;
|
||||
|
||||
use utils::fs as ufs;
|
||||
use errors::{Result, ResultExt};
|
||||
|
@ -133,7 +132,7 @@ pub struct ImageOp {
|
|||
|
||||
impl ImageOp {
|
||||
pub fn new(source: String, op: ResizeOp, quality: u8) -> ImageOp {
|
||||
let mut hasher = XxHash::with_seed(0);
|
||||
let mut hasher = DefaultHasher::new();
|
||||
hasher.write(source.as_ref());
|
||||
op.hash(&mut hasher);
|
||||
hasher.write_u8(quality);
|
||||
|
|
BIN
docs/static/_resized_images/09c08ee3f954d0c100.jpg
vendored
Normal file
After Width: | Height: | Size: 9.6 KiB |
BIN
docs/static/_resized_images/28c11b70e6d31a8400.jpg
vendored
Normal file
After Width: | Height: | Size: 4.5 KiB |
BIN
docs/static/_resized_images/2e13805bc51b68e800.jpg
vendored
Before Width: | Height: | Size: 15 KiB |
BIN
docs/static/_resized_images/2fa5b43d38d9f5a600.jpg
vendored
Before Width: | Height: | Size: 13 KiB |
BIN
docs/static/_resized_images/42758a649ef513b600.jpg
vendored
Normal file
After Width: | Height: | Size: 10 KiB |
BIN
docs/static/_resized_images/4df81a7c614e5cc000.jpg
vendored
Normal file
After Width: | Height: | Size: 4.4 KiB |
BIN
docs/static/_resized_images/5a8ef01aac8b5c8700.jpg
vendored
Before Width: | Height: | Size: 4.7 KiB |
BIN
docs/static/_resized_images/6320cb783d4be30e00.jpg
vendored
Normal file
After Width: | Height: | Size: 4.4 KiB |
BIN
docs/static/_resized_images/6e0991f475d665df00.jpg
vendored
Normal file
After Width: | Height: | Size: 5.4 KiB |
BIN
docs/static/_resized_images/72d0be8c5e35e50f00.jpg
vendored
Normal file
After Width: | Height: | Size: 15 KiB |
BIN
docs/static/_resized_images/78e4b442f0b0cbf700.jpg
vendored
Normal file
After Width: | Height: | Size: 5.5 KiB |
BIN
docs/static/_resized_images/792676f9505fb47700.jpg
vendored
Normal file
After Width: | Height: | Size: 12 KiB |
BIN
docs/static/_resized_images/8b0ae741aed115a800.jpg
vendored
Before Width: | Height: | Size: 5.5 KiB |
BIN
docs/static/_resized_images/b12c7fc72d2815e700.jpg
vendored
Normal file
After Width: | Height: | Size: 3.4 KiB |
BIN
docs/static/_resized_images/b2435b04c4bd3cb400.jpg
vendored
Before Width: | Height: | Size: 3.8 KiB |
BIN
docs/static/_resized_images/b9a9fe3b3dee28cc00.jpg
vendored
Before Width: | Height: | Size: 4.7 KiB |
BIN
docs/static/_resized_images/ca684a0de40c030c00.jpg
vendored
Before Width: | Height: | Size: 4.4 KiB |
BIN
docs/static/_resized_images/e13a85d2c34cbf6900.jpg
vendored
Before Width: | Height: | Size: 5.5 KiB |
BIN
docs/static/_resized_images/f1f9e1ab29575d0f00.jpg
vendored
Before Width: | Height: | Size: 18 KiB |
BIN
docs/static/_resized_images/f969dfdd99d2fe1500.jpg
vendored
Before Width: | Height: | Size: 8.1 KiB |