From 7dbd61ee1df548fbc193cafb5822d0c7c989aedf Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 13 Jul 2026 00:40:05 +0000 Subject: [PATCH 1/4] build(rust): Update Rust toolchain to 1.97 --- rust-toolchain.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rust-toolchain.toml b/rust-toolchain.toml index d8a6cce5a1..b9ef921b05 100644 --- a/rust-toolchain.toml +++ b/rust-toolchain.toml @@ -1,4 +1,4 @@ [toolchain] # We pin the minor version to prevent new Clippy lints from breaking CI. # But, we still want to pick up new patch versions. -channel = "1.96" +channel = "1.97" From af33b6faa8c7b4f8c0be62119f7ad654dff8f55d Mon Sep 17 00:00:00 2001 From: Daniel Szoke Date: Fri, 17 Jul 2026 13:21:31 +0200 Subject: [PATCH 2/4] ref: Fix clippy warnings --- src/api/mod.rs | 4 ++-- src/commands/debug_files/print_sources.rs | 2 +- src/commands/login.rs | 2 +- src/commands/react_native/xcode.rs | 6 +++--- src/config.rs | 6 +++--- src/utils/dif_upload/mod.rs | 2 +- src/utils/fs.rs | 2 +- src/utils/sourcemaps.rs | 6 +++--- src/utils/vcs.rs | 14 +++++++------- src/utils/xcode.rs | 2 +- 10 files changed, 23 insertions(+), 23 deletions(-) diff --git a/src/api/mod.rs b/src/api/mod.rs index 4d42c3c662..b13fa9c204 100644 --- a/src/api/mod.rs +++ b/src/api/mod.rs @@ -2001,7 +2001,7 @@ pub struct Repo { impl fmt::Display for Repo { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - write!(f, "{}:{}", &self.provider.id, &self.id)?; + write!(f, "{}:{}", self.provider.id, self.id)?; if let Some(ref url) = self.url { write!(f, " ({url})")?; } @@ -2087,7 +2087,7 @@ pub struct ProcessedEventTag { impl fmt::Display for ProcessedEventTag { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!(f, "{}: {}", &self.key, &self.value)?; + write!(f, "{}: {}", self.key, self.value)?; Ok(()) } } diff --git a/src/commands/debug_files/print_sources.rs b/src/commands/debug_files/print_sources.rs index 2b6a20b217..5ddc0e1eb4 100644 --- a/src/commands/debug_files/print_sources.rs +++ b/src/commands/debug_files/print_sources.rs @@ -67,7 +67,7 @@ fn print_object_sources(object: &Object) -> Result<()> { for file in debug_session.files() { let file = file?; let abs_path = file.abs_path_str(); - println!(" {}", &abs_path); + println!(" {}", abs_path); let source = debug_session.source_by_path(abs_path.as_str())?; match source { Some(source) => { diff --git a/src/commands/login.rs b/src/commands/login.rs index eed0e7738f..5fd00be86c 100644 --- a/src/commands/login.rs +++ b/src/commands/login.rs @@ -57,7 +57,7 @@ pub fn execute(matches: &ArgMatches) -> Result<()> { && prompt_to_continue("Open browser now?")? && open::that(&token_url).is_err() { - println!("Cannot open browser. Please manually go to {}", &token_url); + println!("Cannot open browser. Please manually go to {}", token_url); } let mut token; diff --git a/src/commands/react_native/xcode.rs b/src/commands/react_native/xcode.rs index 653c2a3d08..23960280b6 100644 --- a/src/commands/react_native/xcode.rs +++ b/src/commands/react_native/xcode.rs @@ -204,9 +204,9 @@ pub fn execute(matches: &ArgMatches) -> Result<()> { let report_file = TempFile::create()?; let node = find_node(); - info!("Using node interpreter '{}'", &node); + info!("Using node interpreter '{}'", node); let hermesc = find_hermesc(); - info!("Using hermesc interpreter '{}'", &hermesc); + info!("Using hermesc interpreter '{}'", hermesc); let bundle_path; let sourcemap_path; @@ -369,7 +369,7 @@ pub fn execute(matches: &ArgMatches) -> Result<()> { let dist_string = plist.build().to_owned(); let release_string = format!("{}@{}+{dist_string}", plist.bundle_id(), plist.version()); - info!("Parse result from Info.plist: {:?}", &plist); + info!("Parse result from Info.plist: {:?}", plist); (Some(dist_string), Some(release_string)) } _ => { diff --git a/src/config.rs b/src/config.rs index 30296962dd..8669f218e4 100644 --- a/src/config.rs +++ b/src/config.rs @@ -680,7 +680,7 @@ fn load_cli_config() -> Result<(PathBuf, Ini)> { }; info!( "Loaded file referenced by SENTRY_PROPERTIES ({})", - &prop_path + prop_path ); for (key, value) in props { let mut iter = key.rsplitn(2, '.'); @@ -696,12 +696,12 @@ fn load_cli_config() -> Result<(PathBuf, Ini)> { if err.kind() != io::ErrorKind::NotFound { return Err(Error::from(err).context(format!( "Failed to load file referenced by SENTRY_PROPERTIES ({})", - &prop_path + prop_path ))); } else { warn!( "Failed to find file referenced by SENTRY_PROPERTIES ({})", - &prop_path + prop_path ); } } diff --git a/src/utils/dif_upload/mod.rs b/src/utils/dif_upload/mod.rs index b3fef2312e..06c1a3fe40 100644 --- a/src/utils/dif_upload/mod.rs +++ b/src/utils/dif_upload/mod.rs @@ -547,7 +547,7 @@ fn find_uuid_plists( // └─ DWARF // └─ App let plist_name = format!("{:X}.plist", uuid.as_hyphenated()); - let plist = source.get_relative(format!("../{}", &plist_name))?; + let plist = source.get_relative(format!("../{}", plist_name))?; let mut plists = BTreeMap::new(); plists.insert(plist_name, plist); diff --git a/src/utils/fs.rs b/src/utils/fs.rs index 6984308280..7d29d00796 100644 --- a/src/utils/fs.rs +++ b/src/utils/fs.rs @@ -95,7 +95,7 @@ impl Drop for TempFile { fn drop(&mut self) { let result = fs::remove_file(&self.path); if let Err(e) = result { - error!("Failed to delete TempFile {}: {e:?}", &self.path.display()); + error!("Failed to delete TempFile {}: {e:?}", self.path.display()); } } diff --git a/src/utils/sourcemaps.rs b/src/utils/sourcemaps.rs index 91bee68f1e..3b2f8ffc53 100644 --- a/src/utils/sourcemaps.rs +++ b/src/utils/sourcemaps.rs @@ -353,7 +353,7 @@ impl SourceMapProcessor { if source.already_uploaded { println!( " {}", - style(format!("{} (skipped; already uploaded)", &source.url)).yellow() + style(format!("{} (skipped; already uploaded)", source.url)).yellow() ); continue; } @@ -1214,12 +1214,12 @@ fn validate_script(source: &mut SourceFile) -> Result<()> { let full_url = Path::new(&source.url).join(url); info!( "found sourcemap for {} at {}", - &source.url, + source.url, full_url.display() ); } else { let full_url = join_url(&source.url, url)?; - info!("found sourcemap for {} at {full_url}", &source.url); + info!("found sourcemap for {} at {full_url}", source.url); }; } else if source.ty == SourceFileType::MinifiedSource { source.error("missing sourcemap!".into()); diff --git a/src/utils/vcs.rs b/src/utils/vcs.rs index 52fb5658f5..fce275f8cb 100644 --- a/src/utils/vcs.rs +++ b/src/utils/vcs.rs @@ -40,7 +40,7 @@ pub struct CommitSpec { impl fmt::Display for CommitSpec { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - write!(f, "{}@{}", &self.repo, &self.rev) + write!(f, "{}@{}", self.repo, self.rev) } } @@ -442,7 +442,7 @@ fn find_matching_rev( disable_discovery: bool, remote_name: Option, ) -> Result> { - info!("Resolving {} ({spec})", &reference); + info!("Resolving {} ({spec})", reference); let r = match reference { GitReference::Commit(commit) => { @@ -460,7 +460,7 @@ fn find_matching_rev( match find_reference_url(&spec.repo, repos)? { None => Ok(None), Some(reference_url) => { - debug!(" Looking for reference URL {}", &reference_url); + debug!(" Looking for reference URL {}", reference_url); // direct reference in root repository found. If we are in discovery // mode we want to also check for matching URLs. @@ -469,7 +469,7 @@ fn find_matching_rev( if let Ok(url) = remote.url(); then { if !discovery || is_matching_url(url, &reference_url) { - debug!(" found match: {url} == {}, {r:?}", &reference_url); + debug!(" found match: {url} == {}, {r:?}", reference_url); let head = repo.revparse_single(r)?; if let Some(tag) = head.as_tag(){ if let Ok(tag_commit) = tag.target() { @@ -478,7 +478,7 @@ fn find_matching_rev( } return Ok(Some(log_match!(head.id().to_string()))); } else { - debug!(" not a match: {url} != {}", &reference_url); + debug!(" not a match: {url} != {}", reference_url); } } } @@ -503,7 +503,7 @@ fn find_matching_submodule( if is_matching_url(submodule_url, &reference_url) { debug!( " found submodule match: {submodule_url} == {}", - &reference_url + reference_url ); // heads on submodules is easier so let's start with that // because that does not require the submodule to be @@ -523,7 +523,7 @@ fn find_matching_submodule( } else { debug!( " not a submodule match: {submodule_url} != {}", - &reference_url + reference_url ); } } diff --git a/src/utils/xcode.rs b/src/utils/xcode.rs index 641d0a8e19..39b26e7d27 100644 --- a/src/utils/xcode.rs +++ b/src/utils/xcode.rs @@ -44,7 +44,7 @@ pub struct XcodeProjectInfo { impl fmt::Display for InfoPlist { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - write!(f, "{} ({})", self.name(), &self.version) + write!(f, "{} ({})", self.name(), self.version) } } From 0d3d65041e034074cd0fb06e45443579b5421508 Mon Sep 17 00:00:00 2001 From: Daniel Szoke Date: Fri, 17 Jul 2026 13:22:01 +0200 Subject: [PATCH 3/4] ref: Fix clippy warnings from previous fixes --- src/commands/debug_files/print_sources.rs | 2 +- src/commands/login.rs | 2 +- src/commands/react_native/xcode.rs | 6 +++--- src/config.rs | 9 +++------ src/utils/dif_upload/mod.rs | 2 +- src/utils/vcs.rs | 14 ++++++-------- 6 files changed, 15 insertions(+), 20 deletions(-) diff --git a/src/commands/debug_files/print_sources.rs b/src/commands/debug_files/print_sources.rs index 5ddc0e1eb4..c625d90b31 100644 --- a/src/commands/debug_files/print_sources.rs +++ b/src/commands/debug_files/print_sources.rs @@ -67,7 +67,7 @@ fn print_object_sources(object: &Object) -> Result<()> { for file in debug_session.files() { let file = file?; let abs_path = file.abs_path_str(); - println!(" {}", abs_path); + println!(" {abs_path}"); let source = debug_session.source_by_path(abs_path.as_str())?; match source { Some(source) => { diff --git a/src/commands/login.rs b/src/commands/login.rs index 5fd00be86c..36ec6d3182 100644 --- a/src/commands/login.rs +++ b/src/commands/login.rs @@ -57,7 +57,7 @@ pub fn execute(matches: &ArgMatches) -> Result<()> { && prompt_to_continue("Open browser now?")? && open::that(&token_url).is_err() { - println!("Cannot open browser. Please manually go to {}", token_url); + println!("Cannot open browser. Please manually go to {token_url}"); } let mut token; diff --git a/src/commands/react_native/xcode.rs b/src/commands/react_native/xcode.rs index 23960280b6..df96239ce1 100644 --- a/src/commands/react_native/xcode.rs +++ b/src/commands/react_native/xcode.rs @@ -204,9 +204,9 @@ pub fn execute(matches: &ArgMatches) -> Result<()> { let report_file = TempFile::create()?; let node = find_node(); - info!("Using node interpreter '{}'", node); + info!("Using node interpreter '{node}'"); let hermesc = find_hermesc(); - info!("Using hermesc interpreter '{}'", hermesc); + info!("Using hermesc interpreter '{hermesc}'"); let bundle_path; let sourcemap_path; @@ -369,7 +369,7 @@ pub fn execute(matches: &ArgMatches) -> Result<()> { let dist_string = plist.build().to_owned(); let release_string = format!("{}@{}+{dist_string}", plist.bundle_id(), plist.version()); - info!("Parse result from Info.plist: {:?}", plist); + info!("Parse result from Info.plist: {plist:?}"); (Some(dist_string), Some(release_string)) } _ => { diff --git a/src/config.rs b/src/config.rs index 8669f218e4..2d6883c595 100644 --- a/src/config.rs +++ b/src/config.rs @@ -679,8 +679,7 @@ fn load_cli_config() -> Result<(PathBuf, Ini)> { } }; info!( - "Loaded file referenced by SENTRY_PROPERTIES ({})", - prop_path + "Loaded file referenced by SENTRY_PROPERTIES ({prop_path})" ); for (key, value) in props { let mut iter = key.rsplitn(2, '.'); @@ -695,13 +694,11 @@ fn load_cli_config() -> Result<(PathBuf, Ini)> { Err(err) => { if err.kind() != io::ErrorKind::NotFound { return Err(Error::from(err).context(format!( - "Failed to load file referenced by SENTRY_PROPERTIES ({})", - prop_path + "Failed to load file referenced by SENTRY_PROPERTIES ({prop_path})" ))); } else { warn!( - "Failed to find file referenced by SENTRY_PROPERTIES ({})", - prop_path + "Failed to find file referenced by SENTRY_PROPERTIES ({prop_path})" ); } } diff --git a/src/utils/dif_upload/mod.rs b/src/utils/dif_upload/mod.rs index 06c1a3fe40..fece18ae48 100644 --- a/src/utils/dif_upload/mod.rs +++ b/src/utils/dif_upload/mod.rs @@ -547,7 +547,7 @@ fn find_uuid_plists( // └─ DWARF // └─ App let plist_name = format!("{:X}.plist", uuid.as_hyphenated()); - let plist = source.get_relative(format!("../{}", plist_name))?; + let plist = source.get_relative(format!("../{plist_name}"))?; let mut plists = BTreeMap::new(); plists.insert(plist_name, plist); diff --git a/src/utils/vcs.rs b/src/utils/vcs.rs index fce275f8cb..d014a4f73f 100644 --- a/src/utils/vcs.rs +++ b/src/utils/vcs.rs @@ -442,7 +442,7 @@ fn find_matching_rev( disable_discovery: bool, remote_name: Option, ) -> Result> { - info!("Resolving {} ({spec})", reference); + info!("Resolving {reference} ({spec})"); let r = match reference { GitReference::Commit(commit) => { @@ -460,7 +460,7 @@ fn find_matching_rev( match find_reference_url(&spec.repo, repos)? { None => Ok(None), Some(reference_url) => { - debug!(" Looking for reference URL {}", reference_url); + debug!(" Looking for reference URL {reference_url}"); // direct reference in root repository found. If we are in discovery // mode we want to also check for matching URLs. @@ -469,7 +469,7 @@ fn find_matching_rev( if let Ok(url) = remote.url(); then { if !discovery || is_matching_url(url, &reference_url) { - debug!(" found match: {url} == {}, {r:?}", reference_url); + debug!(" found match: {url} == {reference_url}, {r:?}"); let head = repo.revparse_single(r)?; if let Some(tag) = head.as_tag(){ if let Ok(tag_commit) = tag.target() { @@ -478,7 +478,7 @@ fn find_matching_rev( } return Ok(Some(log_match!(head.id().to_string()))); } else { - debug!(" not a match: {url} != {}", reference_url); + debug!(" not a match: {url} != {reference_url}"); } } } @@ -502,8 +502,7 @@ fn find_matching_submodule( debug!(" found submodule with URL {submodule_url}"); if is_matching_url(submodule_url, &reference_url) { debug!( - " found submodule match: {submodule_url} == {}", - reference_url + " found submodule match: {submodule_url} == {reference_url}" ); // heads on submodules is easier so let's start with that // because that does not require the submodule to be @@ -522,8 +521,7 @@ fn find_matching_submodule( } } else { debug!( - " not a submodule match: {submodule_url} != {}", - reference_url + " not a submodule match: {submodule_url} != {reference_url}" ); } } From e9c688bcc41817af44a66cd70d13e5da384d2ae1 Mon Sep 17 00:00:00 2001 From: Daniel Szoke Date: Fri, 17 Jul 2026 13:22:44 +0200 Subject: [PATCH 4/4] ref: cargo fmt --- src/config.rs | 8 ++------ src/utils/vcs.rs | 8 ++------ 2 files changed, 4 insertions(+), 12 deletions(-) diff --git a/src/config.rs b/src/config.rs index 2d6883c595..7461baaae6 100644 --- a/src/config.rs +++ b/src/config.rs @@ -678,9 +678,7 @@ fn load_cli_config() -> Result<(PathBuf, Ini)> { bail!("Could not load java style properties file: {err}"); } }; - info!( - "Loaded file referenced by SENTRY_PROPERTIES ({prop_path})" - ); + info!("Loaded file referenced by SENTRY_PROPERTIES ({prop_path})"); for (key, value) in props { let mut iter = key.rsplitn(2, '.'); if let Some(key) = iter.next() { @@ -697,9 +695,7 @@ fn load_cli_config() -> Result<(PathBuf, Ini)> { "Failed to load file referenced by SENTRY_PROPERTIES ({prop_path})" ))); } else { - warn!( - "Failed to find file referenced by SENTRY_PROPERTIES ({prop_path})" - ); + warn!("Failed to find file referenced by SENTRY_PROPERTIES ({prop_path})"); } } } diff --git a/src/utils/vcs.rs b/src/utils/vcs.rs index d014a4f73f..59cf41a80f 100644 --- a/src/utils/vcs.rs +++ b/src/utils/vcs.rs @@ -501,9 +501,7 @@ fn find_matching_submodule( if let Ok(Some(submodule_url)) = submodule.url() { debug!(" found submodule with URL {submodule_url}"); if is_matching_url(submodule_url, &reference_url) { - debug!( - " found submodule match: {submodule_url} == {reference_url}" - ); + debug!(" found submodule match: {submodule_url} == {reference_url}"); // heads on submodules is easier so let's start with that // because that does not require the submodule to be // checked out. @@ -520,9 +518,7 @@ fn find_matching_submodule( return Ok(Some(log_match!(head.id().to_string()))); } } else { - debug!( - " not a submodule match: {submodule_url} != {reference_url}" - ); + debug!(" not a submodule match: {submodule_url} != {reference_url}"); } } }