From 084c3c5f8bfe22c4161c9e8fb8aa64136ec55fe0 Mon Sep 17 00:00:00 2001 From: timvisee Date: Thu, 25 Nov 2021 13:27:44 +0100 Subject: [PATCH] Fix compilation error --- src/mc/favicon.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mc/favicon.rs b/src/mc/favicon.rs index 9450c6b..2a54e8f 100644 --- a/src/mc/favicon.rs +++ b/src/mc/favicon.rs @@ -1,7 +1,7 @@ use crate::proto::client::ClientInfo; /// Protocol version since when favicons are supported. -const FAVICON_PROTOCOL_VERSION: i32 = 4; +const FAVICON_PROTOCOL_VERSION: u32 = 4; /// Get default server status favicon. pub fn default_favicon() -> String { @@ -20,7 +20,7 @@ pub fn encode_favicon(data: &[u8]) -> String { /// Defaults to `true` if unsure. pub fn supports_favicon(client_info: &ClientInfo) -> bool { client_info - .protocol_version + .protocol .map(|p| p >= FAVICON_PROTOCOL_VERSION) .unwrap_or(true) }