fix clippy

This commit is contained in:
Evan Almloff committed 2023-10-20 09:38:10 -05:00
1 parent 1d664c616e
commit 33f0f0c172
8 files changed
+7 -9

No files matched your search

+1 -1
View File
@@ -484,7 +484,7 @@ fn apply_edits(
HydrateText { path, value, id } => channel.hydrate_text(path, value, id.0 as u32),
LoadTemplate { name, index, id } => {
if let Some(tmpl_id) = templates.get(name) {
channel.load_template(*tmpl_id as u16, index as u16, id.0 as u32)
channel.load_template(*tmpl_id, index as u16, id.0 as u32)
}
}
ReplaceWith { id, m } => channel.replace_with(id.0 as u32, m as u16),
+1 -2
View File
@@ -126,7 +126,6 @@ pub(super) fn desktop_handler(
{
Ok(response) => {
responder.respond(response);
return;
}
Err(err) => tracing::error!("error building response: {}", err),
}
@@ -167,7 +166,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");
}