Skip to content

Commit fb8c0f5

Browse files
ide-db: Fix warnings about clippy str_to_string rule
1 parent f4a4b66 commit fb8c0f5

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

crates/ide-db/src/syntax_helpers/format_string_exprs.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ mod tests {
203203
use expect_test::{expect, Expect};
204204

205205
fn check(input: &str, expect: &Expect) {
206-
let (output, exprs) = parse_format_exprs(input).unwrap_or(("-".to_string(), vec![]));
206+
let (output, exprs) = parse_format_exprs(input).unwrap_or(("-".to_owned(), vec![]));
207207
let outcome_repr = if !exprs.is_empty() {
208208
format!("{output}; {}", with_placeholders(exprs).join(", "))
209209
} else {

crates/ide-db/src/tests/sourcegen_lints.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ pub struct LintGroup {
5252
generate_lint_descriptor(sh, &mut contents);
5353
contents.push('\n');
5454

55-
let cargo = std::env::var("CARGO").unwrap_or_else(|_| "cargo".to_string());
55+
let cargo = std::env::var("CARGO").unwrap_or_else(|_| "cargo".to_owned());
5656
let unstable_book = project_root().join("./target/unstable-book-gen");
5757
cmd!(
5858
sh,
@@ -283,7 +283,7 @@ fn generate_descriptor_clippy(buf: &mut String, path: &Path) {
283283
let line = &line[..up_to];
284284

285285
let clippy_lint = clippy_lints.last_mut().expect("clippy lint must already exist");
286-
clippy_lint.help = unescape(line).trim().to_string();
286+
clippy_lint.help = unescape(line).trim().to_owned();
287287
}
288288
}
289289
clippy_lints.sort_by(|lint, lint2| lint.id.cmp(&lint2.id));

0 commit comments

Comments
 (0)