Fix compiler errors

This commit is contained in:
Aster committed 2022-02-09 16:11:02 +08:00
1 parent b6c6dd6532
commit ce628e1197
13 files changed
+101 -64

No files matched your search

+5 -5
View File
@@ -2,14 +2,14 @@ use super::*;
/// Run the WASM project on dev-server
#[derive(Clone, Debug, Parser)]
#[structopt(name = "serve")]
#[clap(name = "serve")]
pub struct Serve {
#[structopt(flatten)]
#[clap(flatten)]
pub serve: ConfigOptsServe,
}
impl Serve {
pub async fn serve(self) -> anyhow::Result<()> {
pub async fn serve(self) -> Result<()> {
let mut crate_config = crate::CrateConfig::new()?;
// change the relase state.
@@ -49,7 +49,7 @@ impl Serve {
return Ok(());
}
_ => {
return Err(anyhow::anyhow!("Unsoppurt platform target."));
return custom_error!("Unsoppurt platform target.");
}
}
@@ -62,7 +62,7 @@ impl Serve {
Ok(())
}
pub fn regen_dev_page(crate_config: &CrateConfig) -> anyhow::Result<()> {
pub fn regen_dev_page(crate_config: &CrateConfig) -> Result<()> {
let serve_html = gen_page(&crate_config.dioxus_config, true);
let mut file = std::fs::File::create(