Преглед изворни кода

Fix: make clippy happy, don't set asset dir env

Jonathan Kelley пре 1 година
родитељ
комит
25844ae9d3
2 измењених фајлова са 1 додато и 7 уклоњено
  1. 0 6
      packages/cli/src/builder.rs
  2. 1 1
      packages/hot-reload/src/file_watcher.rs

+ 0 - 6
packages/cli/src/builder.rs

@@ -335,12 +335,6 @@ pub fn build_desktop(
     let _manganis_support = ManganisSupportGuard::default();
     let _guard = AssetConfigDropGuard::new();
 
-    // set the asset dir via cli args
-    env::set_var(
-        "DIOXUS_ASSET_DIR",
-        config.asset_dir().canonicalize().unwrap(),
-    );
-
     let mut cmd = subprocess::Exec::cmd("cargo")
         .set_rust_flags(rust_flags)
         .env("CARGO_TARGET_DIR", &config.target_dir)

+ 1 - 1
packages/hot-reload/src/file_watcher.rs

@@ -243,7 +243,7 @@ pub fn init<Ctx: HotReloadingContext + Send + 'static>(cfg: Config<Ctx>) {
         // FIXME: use a more robust system here for embedded discovery
         //
         // https://github.com/DioxusLabs/dioxus/issues/1914
-        if listening_paths == &[""] {
+        if listening_paths == [""] {
             for entry in std::fs::read_dir(&crate_dir)
                 .expect("failed to read rust crate directory. Are you running with cargo?")
             {