Use &str instead of &String
We don't need a new object here, a slice is fine.
This commit is contained in:
parent
79b73ee75c
commit
a97e37a9f3
|
|
@ -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();
|
||||
match all_authors.get(initials) {
|
||||
Some(new_main_author) => set_main_author(&new_main_author),
|
||||
|
|
|
|||
Loading…
Reference in New Issue