Skip to content

Commit dd86ae7

Browse files
ci: Enable uninlined-format-args Clippy lint
1 parent ef445a2 commit dd86ae7

File tree

18 files changed

+36
-44
lines changed

18 files changed

+36
-44
lines changed

Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@ allow-attributes = "warn"
103103
str-to-string = "warn"
104104
string-to-string = "warn"
105105
unnecessary-wraps = "warn"
106+
uninlined-format-args = "warn"
106107
unused-trait-names = "warn"
107108
unwrap-used = "warn"
108109

clippy.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1+
allow-mixed-uninlined-format-args = false
12
allow-unwrap-in-tests = true

src/api/mod.rs

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -329,7 +329,7 @@ impl Api {
329329
_ => ARCH,
330330
};
331331

332-
let ref_name = format!("sentry-cli-{}-{}{}", capitalize_string(PLATFORM), arch, EXT);
332+
let ref_name = format!("sentry-cli-{}-{arch}{EXT}", capitalize_string(PLATFORM));
333333
info!("Looking for file named: {}", ref_name);
334334

335335
if resp.status() == 200 {
@@ -894,10 +894,9 @@ impl<'a> AuthenticatedApi<'a> {
894894
};
895895
self.put(
896896
&format!(
897-
"/projects/{}/{}/issues/?{}",
897+
"/projects/{}/{}/issues/?{qs}",
898898
PathArg(org),
899-
PathArg(project),
900-
qs
899+
PathArg(project)
901900
),
902901
changes,
903902
)?
@@ -1253,7 +1252,7 @@ impl<'a> AuthenticatedApi<'a> {
12531252
loop {
12541253
requests_no += 1;
12551254

1256-
let resp = self.get(&format!("{}cursor={}", url, QueryArg(&cursor)))?;
1255+
let resp = self.get(&format!("{url}cursor={}", QueryArg(&cursor)))?;
12571256

12581257
if resp.status() == 404 || (resp.status() == 400 && !cursor.is_empty()) {
12591258
if rv.is_empty() {
@@ -1934,7 +1933,7 @@ fn log_headers(is_response: bool, data: &[u8]) {
19341933
} else {
19351934
format!("{}***", &caps[3][..std::cmp::min(caps[3].len(), 8)])
19361935
};
1937-
format!("{}: {} {}", &caps[1], &caps[2], info)
1936+
format!("{}: {} {info}", &caps[1], &caps[2])
19381937
});
19391938
debug!("{} {}", if is_response { ">" } else { "<" }, replaced);
19401939
}

src/commands/debug_files/check.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ pub fn execute(matches: &ArgMatches) -> Result<()> {
101101
}
102102

103103
if let Some(prob) = dif.get_problem() {
104-
println!(" Usable: {} ({})", style("no").red(), prob);
104+
println!(" Usable: {} ({prob})", style("no").red());
105105
Err(QuietExit(1).into())
106106
} else {
107107
println!(" Usable: {}", style("yes").green());

src/commands/debug_files/find.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ fn find_ids(
186186
eprintln!();
187187
eprintln!("missing debug information files:");
188188
for id in &remaining {
189-
eprintln!(" {} ({})", id, id_hint(id),);
189+
eprintln!(" {id} ({})", id_hint(id),);
190190
}
191191
}
192192
}

src/commands/files/upload.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ pub fn execute(matches: &ArgMatches) -> Result<()> {
202202
.iter()
203203
.map(|source| {
204204
let local_path = source.path.strip_prefix(&source.base_path).unwrap();
205-
let url = format!("{}/{}{}", url_prefix, path_as_url(local_path), url_suffix);
205+
let url = format!("{url_prefix}/{}{url_suffix}", path_as_url(local_path));
206206

207207
(
208208
url.clone(),

src/commands/monitors/run.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -117,10 +117,9 @@ fn run_program(args: Vec<&String>, monitor_slug: &str) -> (bool, Option<i32>, Du
117117
Ok(status) => (status.success(), status.code()),
118118
Err(err) => {
119119
eprintln!(
120-
"{} could not invoke program '{}': {}",
120+
"{} could not invoke program '{}': {err}",
121121
style("error").red(),
122-
args[0],
123-
err
122+
args[0]
124123
);
125124
(false, None)
126125
}

src/commands/react_native/appcenter.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -209,8 +209,8 @@ pub fn execute(matches: &ArgMatches) -> Result<()> {
209209
Some(dists) => {
210210
for dist in dists {
211211
println!(
212-
"Uploading sourcemaps for release {} distribution {}",
213-
&release, dist
212+
"Uploading sourcemaps for release {} distribution {dist}",
213+
&release
214214
);
215215

216216
processor.upload(&UploadContext {

src/commands/react_native/xcode.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -361,7 +361,7 @@ pub fn execute(matches: &ArgMatches) -> Result<()> {
361361
// Successfully discovered and parsed Info.plist
362362
let dist_string = plist.build().to_owned();
363363
let release_string =
364-
format!("{}@{}+{}", plist.bundle_id(), plist.version(), dist_string);
364+
format!("{}@{}+{dist_string}", plist.bundle_id(), plist.version());
365365
info!("Parse result from Info.plist: {:?}", &plist);
366366
(Some(dist_string), Some(release_string))
367367
}

src/commands/send_event.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ pub fn execute(matches: &ArgMatches) -> Result<()> {
213213
send_raw_event(event)?
214214
};
215215

216-
println!("Event from file {} dispatched: {}", path.display(), id);
216+
println!("Event from file {} dispatched: {id}", path.display());
217217
}
218218

219219
return Ok(());

0 commit comments

Comments
 (0)