Skip to content

Commit 61aeab4

Browse files
committed
Update for collections reform
1 parent 87a753e commit 61aeab4

File tree

1 file changed

+4
-4
lines changed
  • src/librustc_back/target

1 file changed

+4
-4
lines changed

src/librustc_back/target/mod.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ impl Target {
217217
let handler = diagnostic::default_handler(diagnostic::Auto, None);
218218

219219
let get_req_field = |name: &str| {
220-
match obj.find(&name.to_string())
220+
match obj.find(name)
221221
.map(|s| s.as_string())
222222
.and_then(|os| os.map(|s| s.to_string())) {
223223
Some(val) => val,
@@ -240,16 +240,16 @@ impl Target {
240240
macro_rules! key (
241241
($key_name:ident) => ( {
242242
let name = (stringify!($key_name)).replace("_", "-");
243-
obj.find(&name).map(|o| o.as_string()
243+
obj.find(name[]).map(|o| o.as_string()
244244
.map(|s| base.options.$key_name = s.to_string()));
245245
} );
246246
($key_name:ident, bool) => ( {
247247
let name = (stringify!($key_name)).replace("_", "-");
248-
obj.find(&name).map(|o| o.as_boolean().map(|s| base.options.$key_name = s));
248+
obj.find(name[]).map(|o| o.as_boolean().map(|s| base.options.$key_name = s));
249249
} );
250250
($key_name:ident, list) => ( {
251251
let name = (stringify!($key_name)).replace("_", "-");
252-
obj.find(&name).map(|o| o.as_list()
252+
obj.find(name[]).map(|o| o.as_list()
253253
.map(|v| base.options.$key_name = v.iter()
254254
.map(|a| a.as_string().unwrap().to_string()).collect()
255255
)

0 commit comments

Comments
 (0)