Browse Source

Fix random clippy warning

Leonard 1 year ago
parent
commit
85839abe56
1 changed files with 1 additions and 1 deletions
  1. 1 1
      packages/desktop/src/protocol.rs

+ 1 - 1
packages/desktop/src/protocol.rs

@@ -153,7 +153,7 @@ fn get_asset_root() -> Option<PathBuf> {
 
 /// Get the mime type from a path-like string
 fn get_mime_from_path(trimmed: &Path) -> Result<&'static str> {
-    if trimmed.ends_with(".svg") {
+    if trimmed.extension().is_some_and(|ext| ext == ".svg") {
         return Ok("image/svg+xml");
     }