Эх сурвалжийг харах

refactor(core): remove http-multipart Cargo feature (#6748)

Lucas Fernandes Nogueira 2 жил өмнө
parent
commit
0c11023bcf

+ 1 - 1
.github/workflows/lint-fmt-core.yml

@@ -50,7 +50,7 @@ jobs:
         clippy:
           - { args: '', key: 'empty' }
           - {
-              args: '--features compression,wry,linux-protocol-headers,isolation,custom-protocol,api-all,updater,system-tray,http-multipart',
+              args: '--features compression,wry,linux-protocol-headers,isolation,custom-protocol,api-all,updater,system-tray',
               key: 'all'
             }
           - { args: '--features custom-protocol', key: 'custom-protocol' }

+ 1 - 1
.github/workflows/test-core.yml

@@ -76,7 +76,7 @@ jobs:
               key: api-all
             }
           - {
-              args: --features compression,wry,linux-protocol-headers,isolation,custom-protocol,api-all,updater,system-tray,http-multipart,
+              args: --features compression,wry,linux-protocol-headers,isolation,custom-protocol,api-all,updater,system-tray,
               key: all
             }
 

+ 0 - 2
core/tauri/Cargo.toml

@@ -23,7 +23,6 @@ features = [
   "fs-extract-api",
   "system-tray",
   "devtools",
-  "http-multipart",
   "icon-png",
   "dox"
 ]
@@ -142,7 +141,6 @@ updater = [
   "dialog-ask",
   "fs-extract-api"
 ]
-http-multipart = [ "reqwest/multipart" ]
 shell-open-api = [ "open", "regex", "tauri-macros/shell-scope" ]
 fs-extract-api = [ "zip" ]
 native-tls = [ "reqwest/native-tls" ]

+ 0 - 3
core/tauri/src/api/error.rs

@@ -21,9 +21,6 @@ pub enum Error {
   /// The dialog operation was cancelled by the user.
   #[error("user cancelled the dialog")]
   DialogCancelled,
-  /// The network error.
-  #[error("Network Error: {0}")]
-  Network(#[from] reqwest::Error),
   /// Invalid HTTP header value.
   #[error(transparent)]
   HttpHeaderValue(#[from] http::header::InvalidHeaderValue),

+ 0 - 2
core/tauri/src/lib.rs

@@ -20,7 +20,6 @@
 //! - **devtools**: Enables the developer tools (Web inspector) and [`Window::open_devtools`]. Enabled by default on debug builds.
 //! On macOS it uses private APIs, so you can't enable it if your app will be published to the App Store.
 //! - **shell-open-api**: Enables the [`api::shell`] module.
-//! - **http-multipart**: Adds support to `multipart/form-data` requests.
 //! - **native-tls**: Provides TLS support to connect over HTTPS.
 //! - **native-tls-vendored**: Compile and statically link to a vendored copy of OpenSSL.
 //! - **rustls-tls**: Provides TLS support to connect over HTTPS using rustls.
@@ -992,7 +991,6 @@ mod tests {
     // features that look like an allowlist feature, but are not
     let allowed = [
       "fs-extract-api",
-      "http-multipart",
       "process-command-api",
       "process-relaunch-dangerous-allow-symlink-macos",
       "window-data-url",

+ 0 - 20
examples/api/src-tauri/Cargo.lock

@@ -1747,16 +1747,6 @@ version = "0.3.16"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "2a60c7ce501c71e03a9c9c0d35b861413ae925bd979cc7a4e30d060069aaac8d"
 
-[[package]]
-name = "mime_guess"
-version = "2.0.4"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4192263c238a5f0d0c6bfd21f336a313a4ce1c450542449ca191bb657b4642ef"
-dependencies = [
- "mime",
- "unicase",
-]
-
 [[package]]
 name = "minisign-verify"
 version = "0.2.1"
@@ -2446,7 +2436,6 @@ dependencies = [
  "js-sys",
  "log",
  "mime",
- "mime_guess",
  "once_cell",
  "percent-encoding",
  "pin-project-lite",
@@ -3446,15 +3435,6 @@ version = "0.1.5"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "9e79c4d996edb816c91e4308506774452e55e95c3c9de07b6729e17e15a5ef81"
 
-[[package]]
-name = "unicase"
-version = "2.6.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "50f37be617794602aabbeee0be4f259dc1778fabe05e2d67ee8f79326d5cb4f6"
-dependencies = [
- "version_check",
-]
-
 [[package]]
 name = "unicode-bidi"
 version = "0.3.10"

+ 0 - 1
examples/api/src-tauri/Cargo.toml

@@ -35,7 +35,6 @@ tauri-build = { path = "../../../core/tauri-build" }
 path = "../../../core/tauri"
 features = [
   "api-all",
-  "http-multipart",
   "icon-ico",
   "icon-png",
   "isolation",