rustc: Don't copy in add_used_link_args

This commit is contained in:
Zack Corr 2013-02-17 14:59:04 +10:00
parent 19eb225bc2
commit 0991437c3b
2 changed files with 2 additions and 2 deletions

View File

@ -196,7 +196,7 @@ fn visit_item(e: @mut Env, i: @ast::item) {
for link_args.each |a| {
match attr::get_meta_item_value_str(attr::attr_meta(*a)) {
Some(ref linkarg) => {
cstore::add_used_link_args(cstore, (/*bad*/copy *linkarg));
cstore::add_used_link_args(cstore, *linkarg);
}
None => {/* fallthrough */ }
}

View File

@ -119,7 +119,7 @@ pub fn get_used_libraries(cstore: @mut CStore) -> ~[~str] {
return /*bad*/copy cstore.used_libraries;
}
pub fn add_used_link_args(cstore: @mut CStore, args: ~str) {
pub fn add_used_link_args(cstore: @mut CStore, args: &str) {
cstore.used_link_args.push_all(str::split_char(args, ' '));
}