Skip to content

Commit 5b61c24

Browse files
Pr0metheangithub-code-quality[bot]Its-Just-Nans
authored
test: Potential fixes for 2 code quality findings in tests/end_to_end.rs (#624)
* Apply suggested fix to tests/end_to_end.rs from Copilot Autofix Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com> Signed-off-by: Chris Hennick <4961925+Pr0methean@users.noreply.github.com> * Apply suggested fix to tests/end_to_end.rs from Copilot Autofix Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com> Signed-off-by: Chris Hennick <4961925+Pr0methean@users.noreply.github.com> * fmt and comment --------- Signed-off-by: Chris Hennick <4961925+Pr0methean@users.noreply.github.com> Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com> Co-authored-by: n4n5 <its.just.n4n5@gmail.com>
1 parent 1c59f3c commit 5b61c24

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

src/extra_fields/mod.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,6 @@ impl TryFrom<u16> for UsedExtraField {
8383
)
8484
}
8585
}
86-
// AE-x encryption structure
8786

8887
/// Known Extra fields (PKWARE and Third party) mappings
8988
pub const EXTRA_FIELD_MAPPING: [u16; 58] = [

tests/end_to_end.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -270,13 +270,13 @@ const COPY_ENTRY_NAME: &str = "test/lorem_ipsum_renamed.txt";
270270
const INTERNAL_COPY_ENTRY_NAME: &str = "test/lorem_ipsum_copied.txt";
271271

272272
#[test]
273-
fn test_extra_field_access() {
273+
fn test_extra_field_mapping_constants() {
274274
// just a test to access the variable in the crate
275275
use zip::extra_fields::EXTRA_FIELD_MAPPING;
276276

277-
assert_eq!(EXTRA_FIELD_MAPPING[0], 1);
278-
assert_eq!(EXTRA_FIELD_MAPPING[0], 0x0001); // ZIP64 extended information extra field
277+
// ZIP64 extended information extra field - 0x0001 which is 1
278+
assert_eq!(EXTRA_FIELD_MAPPING[0], 0x0001);
279279

280-
assert_eq!(EXTRA_FIELD_MAPPING[12], 23);
281-
assert_eq!(EXTRA_FIELD_MAPPING[12], 0x0017); // Strong Encryption Header
280+
// Strong Encryption Header - 0x0017 which is 23
281+
assert_eq!(EXTRA_FIELD_MAPPING[12], 0x0017);
282282
}

0 commit comments

Comments
 (0)