diff --git a/packages/cli/src/builder.rs b/packages/cli/src/builder.rs index c4d1bde6f..fd3202d2e 100644 --- a/packages/cli/src/builder.rs +++ b/packages/cli/src/builder.rs @@ -312,7 +312,7 @@ pub fn build_desktop(config: &CrateConfig, _is_serve: bool) -> Result() }) { return Some(shared.clone()); diff --git a/packages/desktop/src/lib.rs b/packages/desktop/src/lib.rs index b092ceeec..4780690ee 100644 --- a/packages/desktop/src/lib.rs +++ b/packages/desktop/src/lib.rs @@ -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), diff --git a/packages/desktop/src/protocol.rs b/packages/desktop/src/protocol.rs index 41a491749..1dca21759 100644 --- a/packages/desktop/src/protocol.rs +++ b/packages/desktop/src/protocol.rs @@ -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 { /// 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"); } diff --git a/packages/interpreter/Cargo.toml b/packages/interpreter/Cargo.toml index 8d155db6d..7d046fbc8 100644 --- a/packages/interpreter/Cargo.toml +++ b/packages/interpreter/Cargo.toml @@ -23,5 +23,5 @@ default = [] serialize = ["serde"] sledgehammer = ["sledgehammer_bindgen", "sledgehammer_utils"] web = ["sledgehammer", "wasm-bindgen", "js-sys", "web-sys", "sledgehammer_bindgen/web"] -binary-protocol = ["sledgehammer"] +binary-protocol = ["sledgehammer", "wasm-bindgen"] minimal_bindings = [] diff --git a/packages/liveview/src/pool.rs b/packages/liveview/src/pool.rs index 64adfa3d1..eaf699248 100644 --- a/packages/liveview/src/pool.rs +++ b/packages/liveview/src/pool.rs @@ -329,7 +329,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), diff --git a/packages/server-macro/src/lib.rs b/packages/server-macro/src/lib.rs index d00c009d0..2afa19742 100644 --- a/packages/server-macro/src/lib.rs +++ b/packages/server-macro/src/lib.rs @@ -105,7 +105,7 @@ pub fn server(args: proc_macro::TokenStream, s: TokenStream) -> TokenStream { let upper_cammel_case_name = Converter::new() .from_case(Case::Snake) .to_case(Case::UpperCamel) - .convert(&sig.ident.to_string()); + .convert(sig.ident.to_string()); args.struct_name = Some(Ident::new(&upper_cammel_case_name, sig.ident.span())); } let struct_name = args.struct_name.as_ref().unwrap(); diff --git a/packages/web/Cargo.toml b/packages/web/Cargo.toml index 428815576..a21acded7 100644 --- a/packages/web/Cargo.toml +++ b/packages/web/Cargo.toml @@ -13,7 +13,6 @@ keywords = ["dom", "ui", "gui", "react", "wasm"] dioxus-core = { workspace = true, features = ["serialize"] } dioxus-html = { workspace = true, features = ["wasm-bind"] } dioxus-interpreter-js = { workspace = true, features = [ - "sledgehammer", "minimal_bindings", "web", ] }