Quellcode durchsuchen

Fix #2309: rfd doesn't need async-std (#2712)

* Fix #2309: rfd doesn't need to be async
* just use tokio instead of async std
Jonathan Kelley vor 11 Monaten
Ursprung
Commit
0e84d00d9c
3 geänderte Dateien mit 3 neuen und 33 gelöschten Zeilen
  1. 2 31
      Cargo.lock
  2. 1 1
      packages/desktop/Cargo.toml
  3. 0 1
      packages/html/Cargo.toml

+ 2 - 31
Cargo.lock

@@ -314,14 +314,13 @@ version = "0.8.1"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "dd884d7c72877a94102c3715f3b1cd09ff4fac28221add3e57cfbe25c236d093"
 dependencies = [
- "async-fs",
- "async-net",
  "enumflags2",
  "futures-channel",
  "futures-util",
  "rand 0.8.5",
  "serde",
  "serde_repr",
+ "tokio",
  "url",
  "zbus",
 ]
@@ -396,17 +395,6 @@ dependencies = [
  "slab",
 ]
 
-[[package]]
-name = "async-fs"
-version = "2.1.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ebcd09b382f40fcd159c2d695175b2ae620ffa5f3bd6f664131efff4e8b9e04a"
-dependencies = [
- "async-lock 3.4.0",
- "blocking",
- "futures-lite 2.3.0",
-]
-
 [[package]]
 name = "async-global-executor"
 version = "2.4.1"
@@ -481,17 +469,6 @@ dependencies = [
  "pin-project-lite",
 ]
 
-[[package]]
-name = "async-net"
-version = "2.0.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b948000fad4873c1c9339d60f2623323a0cfd3816e5181033c6a5cb68b2accf7"
-dependencies = [
- "async-io 2.3.3",
- "blocking",
- "futures-lite 2.3.0",
-]
-
 [[package]]
 name = "async-process"
 version = "2.2.3"
@@ -2759,7 +2736,6 @@ dependencies = [
  "keyboard-types",
  "lazy-js-bundle",
  "manganis",
- "rfd",
  "rustversion",
  "serde",
  "serde_json",
@@ -11306,15 +11282,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "bb97012beadd29e654708a0fdb4c84bc046f537aecfde2c3ee0a9e4b4d48c725"
 dependencies = [
  "async-broadcast",
- "async-executor",
- "async-fs",
- "async-io 2.3.3",
- "async-lock 3.4.0",
  "async-process",
  "async-recursion",
- "async-task",
  "async-trait",
- "blocking",
  "enumflags2",
  "event-listener 5.3.1",
  "futures-core",
@@ -11328,6 +11298,7 @@ dependencies = [
  "serde_repr",
  "sha1",
  "static_assertions",
+ "tokio",
  "tracing",
  "uds_windows",
  "windows-sys 0.52.0",

+ 1 - 1
packages/desktop/Cargo.toml

@@ -59,7 +59,7 @@ signal-hook = "0.3.17"
 
 [target.'cfg(any(target_os = "windows",target_os = "macos",target_os = "linux",target_os = "dragonfly", target_os = "freebsd", target_os = "netbsd", target_os = "openbsd"))'.dependencies]
 global-hotkey = "0.5.0"
-rfd = "0.14"
+rfd = { version = "0.14", default-features = false, features = ["xdg-portal", "tokio"] }
 muda = "0.11.3"
 
 

+ 0 - 1
packages/html/Cargo.toml

@@ -26,7 +26,6 @@ enumset = "1.1.2"
 keyboard-types = { version = "0.7", default-features = false }
 async-trait = { version = "0.1.58", optional = true }
 tokio = { workspace = true, features = ["fs", "io-util"], optional = true }
-rfd = { version = "0.14", optional = true }
 futures-channel = { workspace = true }
 serde_json = { version = "1", optional = true }
 tracing.workspace = true