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 -4
View File
@@ -1,8 +1,9 @@
use super::*;
/// Build the Rust WASM app and all of its assets.
#[derive(Clone, Debug, Deserialize, Parser)]
#[structopt(name = "config")]
#[derive(Clone, Debug, Deserialize, Subcommand)]
#[clap(name = "config")]
pub enum Config {
/// Init `Dioxus.toml` for project/folder.
Init {
@@ -10,14 +11,14 @@ pub enum Config {
name: String,
/// Cover old config
#[structopt(long)]
#[clap(long)]
#[serde(default)]
force: bool,
},
}
impl Config {
pub fn config(self) -> anyhow::Result<()> {
pub fn config(self) -> Result<()> {
let crate_root = crate::cargo::crate_root()?;
match self {
Config::Init { name, force } => {