Skip to content

Commit 7f7549e

Browse files
committed
fix clippy errors
introduced by #943
1 parent a351d6b commit 7f7549e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/main.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ fn create_migration_file(
7171
let snake_case_name = migration_name
7272
.replace(|c: char| !c.is_alphanumeric(), "_")
7373
.to_lowercase();
74-
let file_name = format!("{}_{}.sql", timestamp, snake_case_name);
74+
let file_name = format!("{timestamp}_{snake_case_name}.sql");
7575
let migrations_dir = Path::new(configuration_directory).join("migrations");
7676

7777
if !migrations_dir.exists() {
@@ -82,7 +82,7 @@ fn create_migration_file(
8282
let mut counter = 1;
8383

8484
while migrations_dir.join(&unique_file_name).exists() {
85-
unique_file_name = format!("{}_{}_{}.sql", timestamp, snake_case_name, counter);
85+
unique_file_name = format!("{timestamp}_{snake_case_name}_{counter}.sql");
8686
counter += 1;
8787
}
8888

@@ -104,6 +104,6 @@ fn create_migration_file(
104104
display_path_str = display_path_str.trim_start_matches("\\\\?\\").to_string();
105105
}
106106
display_path_str = display_path_str.replace('\\', "/");
107-
println!("Migration file created: {}", display_path_str);
107+
println!("Migration file created: {display_path_str}");
108108
Ok(())
109109
}

0 commit comments

Comments
 (0)