From 4667315d4a5d4cdf92de0247a9ae33bc6bee8679 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sat, 4 Jan 2025 00:09:48 +0100 Subject: [PATCH] chore(deps): update rust crate http to 0.2.12 (1.x) (#12176) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: FabianLars Co-authored-by: Fabian-Lars --- Cargo.lock | 4 ++-- core/tauri-config-schema/schema.json | 2 +- core/tauri-runtime/Cargo.toml | 10 +++++----- core/tauri-utils/src/config.rs | 4 ++-- core/tauri-utils/src/resources.rs | 4 ++-- core/tauri/src/api/file/extract.rs | 4 ++-- core/tauri/src/manager.rs | 2 +- core/tauri/src/plugin.rs | 5 +---- core/tauri/src/state.rs | 2 +- core/tauri/src/updater/core.rs | 2 +- core/tauri/src/window.rs | 13 +++++++------ core/tests/app-updater/tests/update.rs | 4 ++-- tooling/api/package.json | 6 ++++-- tooling/api/yarn.lock | 8 ++++---- tooling/cli/node/package.json | 5 +++-- tooling/cli/node/yarn.lock | 8 ++++---- tooling/cli/schema.json | 2 +- tooling/cli/src/build.rs | 2 +- 18 files changed, 44 insertions(+), 43 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 1bbd14ac3e19..8a8b615a98ce 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3078,9 +3078,9 @@ checksum = "dc375e1527247fe1a97d8b7156678dfe7c1af2fc075c9a4db3690ecd2a148068" [[package]] name = "proc-macro2" -version = "1.0.86" +version = "1.0.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e719e8df665df0d1c8fbfd238015744736151d4445ec0836b8e628aae103b77" +checksum = "37d3544b3f2748c54e147655edb5025752e2303145b5aefb3c3ea2c78b973bb0" dependencies = [ "unicode-ident", ] diff --git a/core/tauri-config-schema/schema.json b/core/tauri-config-schema/schema.json index 6cb58cd362e9..36bb7a062e8f 100644 --- a/core/tauri-config-schema/schema.json +++ b/core/tauri-config-schema/schema.json @@ -2004,7 +2004,7 @@ ] }, "dialogImagePath": { - "description": "Path to a bitmap file to use on the installation user interface dialogs. It is used on the welcome and completion dialogs. The required dimensions are 493px × 312px.", + "description": "Path to a bitmap file to use on the installation user interface dialogs. It is used on the welcome and completion dialogs.\n\nThe required dimensions are 493px × 312px.", "type": [ "string", "null" diff --git a/core/tauri-runtime/Cargo.toml b/core/tauri-runtime/Cargo.toml index b3802a494468..d88bbb3c33f2 100644 --- a/core/tauri-runtime/Cargo.toml +++ b/core/tauri-runtime/Cargo.toml @@ -27,13 +27,13 @@ targets = [ unexpected_cfgs = { level = "warn", check-cfg = ['cfg(doc_cfg)'] } [dependencies] -serde = { version = "1.0", features = [ "derive" ] } -serde_json = "1.0" -thiserror = "1.0" +serde = { version = "1", features = [ "derive" ] } +serde_json = "1" +thiserror = "1" tauri-utils = { version = "1.6.1", path = "../tauri-utils" } uuid = { version = "1", features = [ "v4" ] } -http = "0.2.4" -http-range = "0.1.4" +http = "0.2" +http-range = "0.1" raw-window-handle = "0.5" rand = "0.8" url = { version = "2" } diff --git a/core/tauri-utils/src/config.rs b/core/tauri-utils/src/config.rs index 4db5910532e0..00b0e4b64291 100644 --- a/core/tauri-utils/src/config.rs +++ b/core/tauri-utils/src/config.rs @@ -579,7 +579,7 @@ pub struct WixConfig { pub banner_path: Option, /// Path to a bitmap file to use on the installation user interface dialogs. /// It is used on the welcome and completion dialogs. - + /// /// The required dimensions are 493px × 312px. #[serde(alias = "dialog-image-path")] pub dialog_image_path: Option, @@ -3073,7 +3073,7 @@ impl<'d> serde::Deserialize<'d> for PackageVersion { fn deserialize>(deserializer: D) -> Result { struct PackageVersionVisitor; - impl<'d> Visitor<'d> for PackageVersionVisitor { + impl Visitor<'_> for PackageVersionVisitor { type Value = PackageVersion; fn expecting(&self, formatter: &mut fmt::Formatter<'_>) -> fmt::Result { diff --git a/core/tauri-utils/src/resources.rs b/core/tauri-utils/src/resources.rs index fb62a64dcc4d..181c3b621afc 100644 --- a/core/tauri-utils/src/resources.rs +++ b/core/tauri-utils/src/resources.rs @@ -126,7 +126,7 @@ impl Resource { } } -impl<'a> Iterator for ResourcePaths<'a> { +impl Iterator for ResourcePaths<'_> { type Item = crate::Result; fn next(&mut self) -> Option> { @@ -148,7 +148,7 @@ fn normalize(path: &Path) -> PathBuf { dest } -impl<'a> Iterator for ResourcePathsIter<'a> { +impl Iterator for ResourcePathsIter<'_> { type Item = crate::Result; fn next(&mut self) -> Option> { diff --git a/core/tauri/src/api/file/extract.rs b/core/tauri/src/api/file/extract.rs index 31b869370f6d..bd05e7c7db50 100644 --- a/core/tauri/src/api/file/extract.rs +++ b/core/tauri/src/api/file/extract.rs @@ -73,7 +73,7 @@ pub enum Entry<'a, R: Read> { Zip(ZipEntry), } -impl<'a, R: Read> Entry<'a, R> { +impl Entry<'_, R> { /// The entry path. pub fn path(&self) -> crate::api::Result> { match self { @@ -145,7 +145,7 @@ pub struct Extract<'a, R: Read + Seek> { tar_archive: Option>>, } -impl<'a, R: std::fmt::Debug + Read + Seek> std::fmt::Debug for Extract<'a, R> { +impl std::fmt::Debug for Extract<'_, R> { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { f.debug_struct("Extract") .field("reader", &self.reader) diff --git a/core/tauri/src/manager.rs b/core/tauri/src/manager.rs index b670188901a6..8410eb466d36 100644 --- a/core/tauri/src/manager.rs +++ b/core/tauri/src/manager.rs @@ -759,7 +759,7 @@ impl WindowManager { .map(|p| p.to_string()) // the `strip_prefix` only returns None when a request is made to `https://tauri.$P` on Windows // where `$P` is not `localhost/*` - .unwrap_or_else(|| "".to_string()); + .unwrap_or_default(); let asset = manager.get_asset(path)?; let mut builder = HttpResponseBuilder::new() .header("Access-Control-Allow-Origin", &window_origin) diff --git a/core/tauri/src/plugin.rs b/core/tauri/src/plugin.rs index f82fd5d410bd..c4132deb7b80 100644 --- a/core/tauri/src/plugin.rs +++ b/core/tauri/src/plugin.rs @@ -650,10 +650,7 @@ impl PluginStore { let target = tokens.next().unwrap(); if let Some(plugin) = self.store.get_mut(target) { - invoke.message.command = tokens - .next() - .map(|c| c.to_string()) - .unwrap_or_else(String::new); + invoke.message.command = tokens.next().map(|c| c.to_string()).unwrap_or_default(); #[cfg(feature = "tracing")] let _span = tracing::trace_span!("plugin::hooks::ipc", name = plugin.name()).entered(); plugin.extend_api(invoke); diff --git a/core/tauri/src/state.rs b/core/tauri/src/state.rs index fa0eaae53f72..a4a402192ee3 100644 --- a/core/tauri/src/state.rs +++ b/core/tauri/src/state.rs @@ -38,7 +38,7 @@ impl Clone for State<'_, T> { } } -impl<'r, T: Send + Sync + std::fmt::Debug> std::fmt::Debug for State<'r, T> { +impl std::fmt::Debug for State<'_, T> { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { f.debug_tuple("State").field(&self.0).finish() } diff --git a/core/tauri/src/updater/core.rs b/core/tauri/src/updater/core.rs index ae931b392993..39236ee772dd 100644 --- a/core/tauri/src/updater/core.rs +++ b/core/tauri/src/updater/core.rs @@ -998,7 +998,7 @@ fn copy_files_and_run( if output.status.success() { // Rename the MSI to the match file name the Skip UAC task is expecting it to be let temp_msi = temp_dir.with_file_name(bin_name).with_extension("msi"); - Move::from_source(&path) + Move::from_source(path) .to_dest(&temp_msi) .expect("Unable to move update MSI"); let exit_status = Command::new("schtasks") diff --git a/core/tauri/src/window.rs b/core/tauri/src/window.rs index 1b917cafb621..f42232ad4ddd 100644 --- a/core/tauri/src/window.rs +++ b/core/tauri/src/window.rs @@ -135,7 +135,7 @@ pub struct WindowBuilder<'a, R: Runtime> { navigation_handler: Option>, } -impl<'a, R: Runtime> fmt::Debug for WindowBuilder<'a, R> { +impl fmt::Debug for WindowBuilder<'_, R> { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { f.debug_struct("WindowBuilder") .field("manager", &self.manager) @@ -1101,17 +1101,17 @@ impl Window { self.window.dispatcher.is_focused().map_err(Into::into) } - /// Gets the window’s current decoration state. + /// Gets the window's current decoration state. pub fn is_decorated(&self) -> crate::Result { self.window.dispatcher.is_decorated().map_err(Into::into) } - /// Gets the window’s current resizable state. + /// Gets the window's current resizable state. pub fn is_resizable(&self) -> crate::Result { self.window.dispatcher.is_resizable().map_err(Into::into) } - /// Gets the window’s native maximize button state + /// Gets the window's native maximize button state /// /// ## Platform-specific /// @@ -1120,7 +1120,7 @@ impl Window { self.window.dispatcher.is_maximizable().map_err(Into::into) } - /// Gets the window’s native minimize button state + /// Gets the window's native minimize button state /// /// ## Platform-specific /// @@ -1129,7 +1129,7 @@ impl Window { self.window.dispatcher.is_minimizable().map_err(Into::into) } - /// Gets the window’s native close button state + /// Gets the window's native close button state /// /// ## Platform-specific /// @@ -1556,6 +1556,7 @@ impl Window { self.window.dispatcher.url().unwrap() } + /// Returns the current url of the webview. #[cfg(test)] pub fn url(&self) -> Url { self.current_url.clone() diff --git a/core/tests/app-updater/tests/update.rs b/core/tests/app-updater/tests/update.rs index 3e7a899e3323..75f83d30a34f 100644 --- a/core/tests/app-updater/tests/update.rs +++ b/core/tests/app-updater/tests/update.rs @@ -277,7 +277,7 @@ fn update_app_v1() { }, }; build_app( - &options.cli_bin_path, + options.cli_bin_path, &fixture_dir, vec![("TAURI_PRIVATE_KEY", UPDATER_PRIVATE_KEY_NEXT)], &config, @@ -585,7 +585,7 @@ fn start_updater_server( let stream = FramedRead::new(file, BytesCodec::new()); let body = Body::wrap_stream(stream); println!("sending updater response"); - return Ok(Response::new(body)); + Ok(Response::new(body)) } _ => Response::builder() .status(StatusCode::NOT_FOUND) diff --git a/tooling/api/package.json b/tooling/api/package.json index 6b45c9d6c82b..f61ca1f623ad 100644 --- a/tooling/api/package.json +++ b/tooling/api/package.json @@ -66,6 +66,8 @@ "yarn": ">= 1.19.1" }, "resolutions": { - "braces": "3.0.3" - } + "braces": "3.0.3", + "cross-spawn": ">=7.0.6" + }, + "dependencies": {} } diff --git a/tooling/api/yarn.lock b/tooling/api/yarn.lock index 0fa5016e97fa..65dec2decad6 100644 --- a/tooling/api/yarn.lock +++ b/tooling/api/yarn.lock @@ -442,10 +442,10 @@ concat-map@0.0.1: resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" integrity sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg== -cross-spawn@^7.0.2: - version "7.0.3" - resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.3.tgz#f73a85b9d5d41d045551c177e2882d4ac85728a6" - integrity sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w== +cross-spawn@>=7.0.6, cross-spawn@^7.0.2: + version "7.0.6" + resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.6.tgz#8a58fe78f00dcd70c370451759dfbfaf03e8ee9f" + integrity sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA== dependencies: path-key "^3.1.0" shebang-command "^2.0.0" diff --git a/tooling/cli/node/package.json b/tooling/cli/node/package.json index 7dc2c4220347..7c57f122a63c 100644 --- a/tooling/cli/node/package.json +++ b/tooling/cli/node/package.json @@ -40,7 +40,7 @@ "devDependencies": { "@napi-rs/cli": "2.16.1", "cross-env": "7.0.3", - "cross-spawn": "7.0.3", + "cross-spawn": "7.0.6", "fs-extra": "11.1.1", "jest": "29.7.0", "jest-transform-toml": "1.0.0", @@ -48,7 +48,8 @@ }, "resolutions": { "semver": ">=7.5.2", - "braces": "3.0.3" + "braces": "3.0.3", + "cross-spawn": ">=7.0.6" }, "engines": { "node": ">= 10" diff --git a/tooling/cli/node/yarn.lock b/tooling/cli/node/yarn.lock index 55de20b584dd..f201d8bc6e23 100644 --- a/tooling/cli/node/yarn.lock +++ b/tooling/cli/node/yarn.lock @@ -914,10 +914,10 @@ cross-env@7.0.3: dependencies: cross-spawn "^7.0.1" -cross-spawn@7.0.3, cross-spawn@^7.0.1, cross-spawn@^7.0.3: - version "7.0.3" - resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.3.tgz#f73a85b9d5d41d045551c177e2882d4ac85728a6" - integrity sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w== +cross-spawn@7.0.6, cross-spawn@>=7.0.6, cross-spawn@^7.0.1, cross-spawn@^7.0.3: + version "7.0.6" + resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.6.tgz#8a58fe78f00dcd70c370451759dfbfaf03e8ee9f" + integrity sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA== dependencies: path-key "^3.1.0" shebang-command "^2.0.0" diff --git a/tooling/cli/schema.json b/tooling/cli/schema.json index 6cb58cd362e9..36bb7a062e8f 100644 --- a/tooling/cli/schema.json +++ b/tooling/cli/schema.json @@ -2004,7 +2004,7 @@ ] }, "dialogImagePath": { - "description": "Path to a bitmap file to use on the installation user interface dialogs. It is used on the welcome and completion dialogs. The required dimensions are 493px × 312px.", + "description": "Path to a bitmap file to use on the installation user interface dialogs. It is used on the welcome and completion dialogs.\n\nThe required dimensions are 493px × 312px.", "type": [ "string", "null" diff --git a/tooling/cli/src/build.rs b/tooling/cli/src/build.rs index 7eca16ea1142..ee58b62ff8df 100644 --- a/tooling/cli/src/build.rs +++ b/tooling/cli/src/build.rs @@ -426,7 +426,7 @@ mod pkgconfig_utils { if !output.stdout.is_empty() { // output would be "-L/path/to/library\n" let word = output.stdout[2..].to_vec(); - return Some(String::from_utf8_lossy(&word).trim().to_string()); + Some(String::from_utf8_lossy(&word).trim().to_string()) } else { None }