oldmap: remove the legacy each_value method
This commit is contained in:
parent
643479f2e5
commit
88d9d417a1
4 changed files with 7 additions and 11 deletions
|
|
@ -748,7 +748,7 @@ pub fn configure(opts: Options) -> Cargo {
|
|||
}
|
||||
|
||||
pub fn for_each_package(c: &Cargo, b: fn(s: @Source, p: &Package)) {
|
||||
for c.sources.each_value |v| {
|
||||
for c.sources.each_value_ref |&v| {
|
||||
for v.packages.each |p| {
|
||||
b(v, p);
|
||||
}
|
||||
|
|
@ -1569,7 +1569,7 @@ pub fn cmd_list(c: &Cargo) {
|
|||
}
|
||||
}
|
||||
} else {
|
||||
for c.sources.each_value |v| {
|
||||
for c.sources.each_value_ref |&v| {
|
||||
print_source(v);
|
||||
}
|
||||
}
|
||||
|
|
@ -1675,7 +1675,7 @@ pub fn copy_warn(srcfile: &Path, destfile: &Path) {
|
|||
|
||||
pub fn cmd_sources(c: &Cargo) {
|
||||
if vec::len(c.opts.free) < 3u {
|
||||
for c.sources.each_value |v| {
|
||||
for c.sources.each_value_ref |&v| {
|
||||
info(fmt!("%s (%s) via %s",
|
||||
v.name, v.url, v.method));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -148,7 +148,7 @@ pub fn get_dep_hashes(cstore: CStore) -> ~[~str] {
|
|||
type crate_hash = {name: ~str, hash: ~str};
|
||||
let mut result = ~[];
|
||||
|
||||
for p(cstore).use_crate_map.each_value |cnum| {
|
||||
for p(cstore).use_crate_map.each_value_ref |&cnum| {
|
||||
let cdata = cstore::get_crate_data(cstore, cnum);
|
||||
let hash = decoder::get_crate_hash(cdata.data);
|
||||
debug!("Add hash[%s]: %s", cdata.name, hash);
|
||||
|
|
|
|||
|
|
@ -1085,7 +1085,7 @@ pub fn store_non_ref_bindings(bcx: block,
|
|||
*/
|
||||
|
||||
let mut bcx = bcx;
|
||||
for data.bindings_map.each_value |binding_info| {
|
||||
for data.bindings_map.each_value_ref |&binding_info| {
|
||||
match binding_info.trmode {
|
||||
TrByValue(is_move, lldest) => {
|
||||
let llval = Load(bcx, binding_info.llmatch); // get a T*
|
||||
|
|
@ -1119,7 +1119,7 @@ pub fn insert_lllocals(bcx: block,
|
|||
* the `fcx.lllocals` map. If add_cleans is true, then adds cleanups for
|
||||
* the bindings. */
|
||||
|
||||
for data.bindings_map.each_value |binding_info| {
|
||||
for data.bindings_map.each_value_ref |&binding_info| {
|
||||
let llval = match binding_info.trmode {
|
||||
// By value bindings: use the stack slot that we
|
||||
// copied/moved the value into
|
||||
|
|
@ -1191,7 +1191,7 @@ pub fn compile_guard(bcx: block,
|
|||
|
||||
fn drop_bindings(bcx: block, data: &ArmData) -> block {
|
||||
let mut bcx = bcx;
|
||||
for data.bindings_map.each_value |binding_info| {
|
||||
for data.bindings_map.each_value_ref |&binding_info| {
|
||||
match binding_info.trmode {
|
||||
TrByValue(_, llval) => {
|
||||
bcx = glue::drop_ty(bcx, llval, binding_info.ty);
|
||||
|
|
|
|||
|
|
@ -324,10 +324,6 @@ pub mod chained {
|
|||
self.each_key_ref(|p| blk(*p))
|
||||
}
|
||||
|
||||
pure fn each_value(blk: fn(value: V) -> bool) {
|
||||
self.each_value_ref(|p| blk(*p))
|
||||
}
|
||||
|
||||
pure fn each_ref(blk: fn(key: &K, value: &V) -> bool) {
|
||||
for self.each_entry |entry| {
|
||||
if !blk(&entry.key, &entry.value) { break; }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue