diff --git a/README.md b/README.md index cc9b95c..6273505 100644 --- a/README.md +++ b/README.md @@ -223,6 +223,9 @@ rules: ## Changelog +### 0.3.1 +- Fix swapped actual and nominal for hash and text-compares + ### 0.3.0 - Allow RGBA image comparison - Add file metadata comparison diff --git a/src/hash.rs b/src/hash.rs index d078b27..28db8b1 100644 --- a/src/hash.rs +++ b/src/hash.rs @@ -59,8 +59,8 @@ impl Default for HashConfig { } pub fn compare_files>( - actual_path: P, nominal_path: P, + actual_path: P, config: &HashConfig, ) -> Result { let act = config @@ -73,8 +73,8 @@ pub fn compare_files>( let diff = if act != nom { vec![format!( "Nominal file's hash is '{}' actual is '{}'", - HEXLOWER.encode(&act), - HEXLOWER.encode(&nom) + HEXLOWER.encode(&nom), + HEXLOWER.encode(&act) )] } else { vec![] diff --git a/src/html.rs b/src/html.rs index ae81327..e0e0d51 100644 --- a/src/html.rs +++ b/src/html.rs @@ -55,8 +55,8 @@ pub enum Error { } pub fn compare_files>( - actual_path: P, nominal_path: P, + actual_path: P, config: &HTMLCompareConfig, ) -> Result { let actual = BufReader::new(fat_io_wrap_std(actual_path.as_ref(), &File::open)?);