rustc/session: use to_owned when no string conversion is needed
This commit is contained in:
parent
0b2e9f762a
commit
e5eb538563
1 changed files with 2 additions and 2 deletions
|
|
@ -2157,7 +2157,7 @@ pub fn build_session_options_and_crate_config(
|
|||
let mut name_parts = name.splitn(2, ':');
|
||||
let name = name_parts.next().unwrap();
|
||||
let new_name = name_parts.next();
|
||||
(name.to_string(), new_name.map(|n| n.to_string()), kind)
|
||||
(name.to_owned(), new_name.map(|n| n.to_owned()), kind)
|
||||
})
|
||||
.collect();
|
||||
|
||||
|
|
@ -2223,7 +2223,7 @@ pub fn build_session_options_and_crate_config(
|
|||
};
|
||||
|
||||
externs
|
||||
.entry(name.to_string())
|
||||
.entry(name.to_owned())
|
||||
.or_default()
|
||||
.insert(location);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue