From 3231d56a137c5f40ab406d257b89c0625e8abb02 Mon Sep 17 00:00:00 2001 From: Barrett Karstens Date: Tue, 17 Sep 2024 12:44:28 -0700 Subject: [PATCH] struct definition before impl --- .../Crates/RustAdvancedLoggerDxe/src/lib.rs | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/AdvLoggerPkg/Crates/RustAdvancedLoggerDxe/src/lib.rs b/AdvLoggerPkg/Crates/RustAdvancedLoggerDxe/src/lib.rs index 94c703ec18..f127f94b15 100644 --- a/AdvLoggerPkg/Crates/RustAdvancedLoggerDxe/src/lib.rs +++ b/AdvLoggerPkg/Crates/RustAdvancedLoggerDxe/src/lib.rs @@ -71,14 +71,6 @@ struct AdvancedLoggerProtocolInterface { write_log: AdvancedLoggerWriteProtocol, } -impl Deref for AdvancedLoggerProtocol { - type Target = efi::Guid; - - fn deref(&self) -> &Self::Target { - self.protocol_guid() - } -} - struct AdvancedLoggerProtocol; unsafe impl Protocol for AdvancedLoggerProtocol { @@ -88,6 +80,14 @@ unsafe impl Protocol for AdvancedLoggerProtocol { } } +impl Deref for AdvancedLoggerProtocol { + type Target = efi::Guid; + + fn deref(&self) -> &Self::Target { + self.protocol_guid() + } +} + // Private un-synchronized AdvancedLogger wrapper. Provides implementation of fmt::Write for AdvancedLogger. #[derive(Debug)] struct AdvancedLogger {