pass clippy (#575)

This commit is contained in:
Demonthos authored and GitHub committed 2022-10-02 14:12:24 -07:00
1 parent 047ed1e553
commit daeffd4149
20 files changed
+259 -345

No files matched your search

+1 -1
View File
@@ -189,7 +189,7 @@ pub(super) fn handler(
MaximizeToggle => window.set_maximized(!window.is_maximized()),
Fullscreen(state) => {
if let Some(handle) = window.current_monitor() {
window.set_fullscreen(state.then(|| WryFullscreen::Borderless(Some(handle))));
window.set_fullscreen(state.then_some(WryFullscreen::Borderless(Some(handle))));
}
}
FocusWindow => window.set_focus(),
+1 -1
View File
@@ -113,7 +113,7 @@ fn get_mime_from_path(trimmed: &str) -> Result<&str> {
return Ok("image/svg+xml");
}
let res = match infer::get_from_path(&trimmed)?.map(|f| f.mime_type()) {
let res = match infer::get_from_path(trimmed)?.map(|f| f.mime_type()) {
Some(t) if t == "text/plain" => get_mime_by_ext(trimmed),
Some(f) => f,
None => get_mime_by_ext(trimmed),