Fix compilation error
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
Reference in New Issue
Block a user