// except according to those terms.
struct cat {
- priv meows : uint,
+ meows : uint,
how_hungry : int,
}
impl cat {
- fn play(&mut self) {
+ pub fn play(&mut self) {
self.meows += 1u;
self.nap();
}
}
-priv impl cat {
- fn nap(&mut self) { for uint::range(1u, 10u) |_i| { }}
+impl cat {
+ fn nap(&mut self) { for _ in range(1u, 10u) { } }
}
fn cat(in_x : uint, in_y : int) -> cat {