// Copyright 2012 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // // Licensed under the Apache License, Version 2.0 or the MIT license // , at your // option. This file may not be copied, modified, or distributed // except according to those terms. mod inst { #[allow(non_camel_case_types)] pub type IMPL_T = Option; pub pure fn EACH(self: &IMPL_T, f: fn(v: &A) -> bool) { match *self { None => (), Some(ref a) => { f(a); } } } pub pure fn SIZE_HINT(self: &IMPL_T) -> Option { match *self { None => Some(0), Some(_) => Some(1) } } }