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