Unnamed repository; edit this file 'description' to name the repository.
remove false positive
Kartavya Vashishtha 2022-09-10
parent cc72008 · commit a5cbee4
-rw-r--r--crates/ide-assists/src/handlers/move_format_string_arg.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/crates/ide-assists/src/handlers/move_format_string_arg.rs b/crates/ide-assists/src/handlers/move_format_string_arg.rs
index 54b5bee9b7..4a5dd09c88 100644
--- a/crates/ide-assists/src/handlers/move_format_string_arg.rs
+++ b/crates/ide-assists/src/handlers/move_format_string_arg.rs
@@ -51,6 +51,9 @@ pub(crate) fn move_format_string_arg(acc: &mut Assists, ctx: &AssistContext<'_>)
}
let (new_fmt, extracted_args) = parse_format_exprs(fmt_string.text()).ok()?;
+ if extracted_args.is_empty() {
+ return None;
+ }
acc.add(
AssistId("move_format_string_arg", AssistKind::QuickFix),