Skip to content

Commit

Permalink
chore(deps): update rust crate http to 0.2.12 (1.x) (#12176)
Browse files Browse the repository at this point in the history
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: FabianLars <[email protected]>
Co-authored-by: Fabian-Lars <[email protected]>
  • Loading branch information
3 people authored Jan 3, 2025
1 parent 7c16d0f commit 4667315
Show file tree
Hide file tree
Showing 18 changed files with 44 additions and 43 deletions.
4 changes: 2 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion core/tauri-config-schema/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
10 changes: 5 additions & 5 deletions core/tauri-runtime/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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" }
Expand Down
4 changes: 2 additions & 2 deletions core/tauri-utils/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -579,7 +579,7 @@ pub struct WixConfig {
pub banner_path: Option<PathBuf>,
/// 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<PathBuf>,
Expand Down Expand Up @@ -3073,7 +3073,7 @@ impl<'d> serde::Deserialize<'d> for PackageVersion {
fn deserialize<D: Deserializer<'d>>(deserializer: D) -> Result<PackageVersion, D::Error> {
struct PackageVersionVisitor;

impl<'d> Visitor<'d> for PackageVersionVisitor {
impl Visitor<'_> for PackageVersionVisitor {
type Value = PackageVersion;

fn expecting(&self, formatter: &mut fmt::Formatter<'_>) -> fmt::Result {
Expand Down
4 changes: 2 additions & 2 deletions core/tauri-utils/src/resources.rs
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ impl Resource {
}
}

impl<'a> Iterator for ResourcePaths<'a> {
impl Iterator for ResourcePaths<'_> {
type Item = crate::Result<PathBuf>;

fn next(&mut self) -> Option<crate::Result<PathBuf>> {
Expand All @@ -148,7 +148,7 @@ fn normalize(path: &Path) -> PathBuf {
dest
}

impl<'a> Iterator for ResourcePathsIter<'a> {
impl Iterator for ResourcePathsIter<'_> {
type Item = crate::Result<Resource>;

fn next(&mut self) -> Option<crate::Result<Resource>> {
Expand Down
4 changes: 2 additions & 2 deletions core/tauri/src/api/file/extract.rs
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ pub enum Entry<'a, R: Read> {
Zip(ZipEntry),
}

impl<'a, R: Read> Entry<'a, R> {
impl<R: Read> Entry<'_, R> {
/// The entry path.
pub fn path(&self) -> crate::api::Result<Cow<'_, Path>> {
match self {
Expand Down Expand Up @@ -145,7 +145,7 @@ pub struct Extract<'a, R: Read + Seek> {
tar_archive: Option<tar::Archive<&'a mut ArchiveReader<R>>>,
}

impl<'a, R: std::fmt::Debug + Read + Seek> std::fmt::Debug for Extract<'a, R> {
impl<R: std::fmt::Debug + Read + Seek> 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)
Expand Down
2 changes: 1 addition & 1 deletion core/tauri/src/manager.rs
Original file line number Diff line number Diff line change
Expand Up @@ -759,7 +759,7 @@ impl<R: Runtime> WindowManager<R> {
.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)
Expand Down
5 changes: 1 addition & 4 deletions core/tauri/src/plugin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -650,10 +650,7 @@ impl<R: Runtime> PluginStore<R> {
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);
Expand Down
2 changes: 1 addition & 1 deletion core/tauri/src/state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ impl<T: Send + Sync + 'static> Clone for State<'_, T> {
}
}

impl<'r, T: Send + Sync + std::fmt::Debug> std::fmt::Debug for State<'r, T> {
impl<T: Send + Sync + std::fmt::Debug> 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()
}
Expand Down
2 changes: 1 addition & 1 deletion core/tauri/src/updater/core.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
13 changes: 7 additions & 6 deletions core/tauri/src/window.rs
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ pub struct WindowBuilder<'a, R: Runtime> {
navigation_handler: Option<Box<NavigationHandler>>,
}

impl<'a, R: Runtime> fmt::Debug for WindowBuilder<'a, R> {
impl<R: Runtime> fmt::Debug for WindowBuilder<'_, R> {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
f.debug_struct("WindowBuilder")
.field("manager", &self.manager)
Expand Down Expand Up @@ -1101,17 +1101,17 @@ impl<R: Runtime> Window<R> {
self.window.dispatcher.is_focused().map_err(Into::into)
}

/// Gets the windows current decoration state.
/// Gets the window's current decoration state.
pub fn is_decorated(&self) -> crate::Result<bool> {
self.window.dispatcher.is_decorated().map_err(Into::into)
}

/// Gets the windows current resizable state.
/// Gets the window's current resizable state.
pub fn is_resizable(&self) -> crate::Result<bool> {
self.window.dispatcher.is_resizable().map_err(Into::into)
}

/// Gets the windows native maximize button state
/// Gets the window's native maximize button state
///
/// ## Platform-specific
///
Expand All @@ -1120,7 +1120,7 @@ impl<R: Runtime> Window<R> {
self.window.dispatcher.is_maximizable().map_err(Into::into)
}

/// Gets the windows native minimize button state
/// Gets the window's native minimize button state
///
/// ## Platform-specific
///
Expand All @@ -1129,7 +1129,7 @@ impl<R: Runtime> Window<R> {
self.window.dispatcher.is_minimizable().map_err(Into::into)
}

/// Gets the windows native close button state
/// Gets the window's native close button state
///
/// ## Platform-specific
///
Expand Down Expand Up @@ -1556,6 +1556,7 @@ impl<R: Runtime> Window<R> {
self.window.dispatcher.url().unwrap()
}

/// Returns the current url of the webview.
#[cfg(test)]
pub fn url(&self) -> Url {
self.current_url.clone()
Expand Down
4 changes: 2 additions & 2 deletions core/tests/app-updater/tests/update.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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)
Expand Down
6 changes: 4 additions & 2 deletions tooling/api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,8 @@
"yarn": ">= 1.19.1"
},
"resolutions": {
"braces": "3.0.3"
}
"braces": "3.0.3",
"cross-spawn": ">=7.0.6"
},
"dependencies": {}
}
8 changes: 4 additions & 4 deletions tooling/api/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -442,10 +442,10 @@ [email protected]:
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"
Expand Down
5 changes: 3 additions & 2 deletions tooling/cli/node/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,16 @@
"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",
"prettier": "2.8.8"
},
"resolutions": {
"semver": ">=7.5.2",
"braces": "3.0.3"
"braces": "3.0.3",
"cross-spawn": ">=7.0.6"
},
"engines": {
"node": ">= 10"
Expand Down
8 changes: 4 additions & 4 deletions tooling/cli/node/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -914,10 +914,10 @@ [email protected]:
dependencies:
cross-spawn "^7.0.1"

[email protected].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==
[email protected].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"
Expand Down
2 changes: 1 addition & 1 deletion tooling/cli/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion tooling/cli/src/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit 4667315

Please sign in to comment.