From 9ab3ed217033fbc14584dfccc998da54786326c9 Mon Sep 17 00:00:00 2001 From: Scott Anderson <662325+scottanderson@users.noreply.github.com> Date: Sun, 28 Jun 2026 15:35:20 -0400 Subject: [PATCH] Fix clippy failure --- src/lib.rs | 2 +- src/types.rs | 2 +- tests/gvas_tests/errors.rs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index e12773a..c72922a 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -108,7 +108,7 @@ use crate::{ }; /// The four bytes 'GVAS' appear at the beginning of every GVAS file. -pub const FILE_TYPE_GVAS: u32 = u32::from_le_bytes([b'G', b'V', b'A', b'S']); +pub const FILE_TYPE_GVAS: u32 = u32::from_le_bytes(*b"GVAS"); /// Stores information about GVAS file, engine version, etc. #[derive(Debug, Clone, PartialEq, Eq)] diff --git a/src/types.rs b/src/types.rs index 0c93ee6..22705f4 100644 --- a/src/types.rs +++ b/src/types.rs @@ -106,7 +106,7 @@ impl From for u128 { impl Debug for Guid { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { let guid = self.to_string(); - write!(f, "Guid({})", &guid) + write!(f, "Guid({})", guid) } } diff --git a/tests/gvas_tests/errors.rs b/tests/gvas_tests/errors.rs index f71a45f..04c39de 100644 --- a/tests/gvas_tests/errors.rs +++ b/tests/gvas_tests/errors.rs @@ -24,7 +24,7 @@ fn test_unexpected_eof() { } } -const INVALID_HEADER: [u8; 4] = [b'G', b'V', b'A', b'Z']; +const INVALID_HEADER: [u8; 4] = *b"GVAZ"; #[test] fn test_invalid_header() {