fix clippy

This commit is contained in:
Evan Almloff committed 2023-07-18 12:43:02 -07:00
1 parent 4a0869de7b
commit f3b3c0698b
4 files changed
+12 -18

No files matched your search

+4 -7
View File
@@ -32,13 +32,10 @@ impl Build {
crate_config.set_features(self.build.features.unwrap());
}
let platform = self.build.platform.unwrap_or_else(|| {
crate_config
.dioxus_config
.application
.default_platform
.clone()
});
let platform = self
.build
.platform
.unwrap_or(crate_config.dioxus_config.application.default_platform);
#[cfg(feature = "plugin")]
let _ = PluginManager::on_build_start(&crate_config, &platform);
+4 -7
View File
@@ -34,13 +34,10 @@ impl Serve {
// Subdirectories don't work with the server
crate_config.dioxus_config.web.app.base_path = None;
let platform = self.serve.platform.unwrap_or_else(|| {
crate_config
.dioxus_config
.application
.default_platform
.clone()
});
let platform = self
.serve
.platform
.unwrap_or(crate_config.dioxus_config.application.default_platform);
match platform {
cfg::Platform::Web => {
+2 -2
View File
@@ -473,7 +473,7 @@ async fn ws_handler(
}
fn build(config: &CrateConfig, reload_tx: &Sender<()>) -> Result<BuildResult> {
let result = builder::build(&config, true)?;
let result = builder::build(config, true)?;
// change the websocket reload state to true;
// the page will auto-reload.
if config
@@ -483,7 +483,7 @@ fn build(config: &CrateConfig, reload_tx: &Sender<()>) -> Result<BuildResult> {
.reload_html
.unwrap_or(false)
{
let _ = Serve::regen_dev_page(&config);
let _ = Serve::regen_dev_page(config);
}
let _ = reload_tx.send(());
Ok(result)
+2 -2
View File
@@ -688,13 +688,13 @@ impl<'src> ScopeState {
raw_ref.downcast_mut::<State>()
})
.expect(
r###"
r#"
Unable to retrieve the hook that was initialized at this index.
Consult the `rules of hooks` to understand how to use hooks properly.
You likely used the hook in a conditional. Hooks rely on consistent ordering between renders.
Functions prefixed with "use" should never be called conditionally.
"###,
"#,
)
}
}