Use &str instead of &String

We don't need a new object here, a slice is fine.
This commit is contained in:
Martin Frost 2021-08-18 22:44:27 +02:00
parent 79b73ee75c
commit a97e37a9f3
1 changed files with 1 additions and 1 deletions

View File

@ -40,7 +40,7 @@ fn list_coauthors() {
} }
} }
fn override_main_author(initials: &String) { fn override_main_author(initials: &str) {
let all_authors = get_available_coauthors(); let all_authors = get_available_coauthors();
match all_authors.get(initials) { match all_authors.get(initials) {
Some(new_main_author) => set_main_author(&new_main_author), Some(new_main_author) => set_main_author(&new_main_author),