From fc48fe618342d190db813e779c227d0223b715ba Mon Sep 17 00:00:00 2001 From: Philipp Oppermann Date: Tue, 30 Apr 2024 13:37:32 +0200 Subject: [PATCH] Silence dead code warning The field is not read anywhere, but printed as part of the Debug output on error. --- src/page_table.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/page_table.rs b/src/page_table.rs index 2163c3a2..62a2be07 100644 --- a/src/page_table.rs +++ b/src/page_table.rs @@ -17,7 +17,11 @@ pub struct MemoryInfo { #[derive(Debug)] pub enum MapKernelError { - Mapping(MapToError), + Mapping( + /// This field is never read, but still printed as part of the Debug output on error. + #[allow(dead_code)] + MapToError, + ), MultipleTlsSegments, }