diff options
| author | Marijn Haverbeke <[email protected]> | 2011-05-12 17:24:54 +0200 |
|---|---|---|
| committer | Marijn Haverbeke <[email protected]> | 2011-05-12 21:30:44 +0200 |
| commit | 3816e57fd2a8ab19e4ac6d4b3ddd5b49d5973ff2 (patch) | |
| tree | 508982ed2f789aedd89eebd529343d9dc88b8e01 /src/test/bench/99-bottles | |
| parent | Transitional change to make extfmt output lowercase module name (diff) | |
| download | rust-3816e57fd2a8ab19e4ac6d4b3ddd5b49d5973ff2.tar.xz rust-3816e57fd2a8ab19e4ac6d4b3ddd5b49d5973ff2.zip | |
Downcase std modules again, move to :: for module dereferencing
This should be a snapshot transition.
Diffstat (limited to 'src/test/bench/99-bottles')
| -rw-r--r-- | src/test/bench/99-bottles/99bob-iter.rs | 12 | ||||
| -rw-r--r-- | src/test/bench/99-bottles/99bob-pattern.rs | 10 | ||||
| -rw-r--r-- | src/test/bench/99-bottles/99bob-simple.rs | 12 | ||||
| -rw-r--r-- | src/test/bench/99-bottles/99bob-tail.rs | 10 |
4 files changed, 22 insertions, 22 deletions
diff --git a/src/test/bench/99-bottles/99bob-iter.rs b/src/test/bench/99-bottles/99bob-iter.rs index e8cc4b4b..5aa3dc2f 100644 --- a/src/test/bench/99-bottles/99bob-iter.rs +++ b/src/test/bench/99-bottles/99bob-iter.rs @@ -1,10 +1,10 @@ -/* -*- mode:rust;indent-tabs-mode:nil -*- +/* -*- mode::rust;indent-tabs-mode::nil -*- * Implementation of 99 Bottles of Beer * http://99-bottles-of-beer.net/ */ use std; -import std.Int; -import std.Str; +import std::_int; +import std::_str; fn b1() -> str { ret "# of beer on the wall, # of beer."; @@ -32,15 +32,15 @@ case (1) { ns = "1 bottle"; } case (_) { - ns = Int.to_str(n, 10u) + " bottles"; + ns = _int::to_str(n, 10u) + " bottles"; } } - while (i < Str.byte_len(t)) { + while (i < _str::byte_len(t)) { if (t.(i) == ('#' as u8)) { b += ns; } else { - Str.push_byte(b, t.(i)); + _str::push_byte(b, t.(i)); } i += 1u; } diff --git a/src/test/bench/99-bottles/99bob-pattern.rs b/src/test/bench/99-bottles/99bob-pattern.rs index fc9ddddb..311fca46 100644 --- a/src/test/bench/99-bottles/99bob-pattern.rs +++ b/src/test/bench/99-bottles/99bob-pattern.rs @@ -1,10 +1,10 @@ -/* -*- mode:rust;indent-tabs-mode:nil -*- +/* -*- mode::rust;indent-tabs-mode::nil -*- * Implementation of 99 Bottles of Beer * http://99-bottles-of-beer.net/ */ use std; -import std.Int; -import std.Str; +import std::_int; +import std::_str; tag bottle { none; dual; single; multiple(int);} @@ -25,8 +25,8 @@ fn show(bottle b) { log "Take one down and pass it around, 1 bottle of beer on the wall."; } case (multiple(?n)) { - let str nb = Int.to_str(n, 10u); - let str mb = Int.to_str(n - 1, 10u); + let str nb = _int::to_str(n, 10u); + let str mb = _int::to_str(n - 1, 10u); log nb + " bottles of beer on the wall, " + nb + " bottles of beer,"; log "Take one down and pass it around, " + mb + " bottles of beer on the wall."; diff --git a/src/test/bench/99-bottles/99bob-simple.rs b/src/test/bench/99-bottles/99bob-simple.rs index 5c0f0824..569b076a 100644 --- a/src/test/bench/99-bottles/99bob-simple.rs +++ b/src/test/bench/99-bottles/99bob-simple.rs @@ -1,10 +1,10 @@ -/* -*- mode:rust;indent-tabs-mode:nil -*- +/* -*- mode::rust;indent-tabs-mode::nil -*- * Implementation of 99 Bottles of Beer * http://99-bottles-of-beer.net/ */ use std; -import std.Int; -import std.Str; +import std::_int; +import std::_str; fn b1() -> str { ret "# of beer on the wall, # of beer."; @@ -31,15 +31,15 @@ case (1) { ns = "1 bottle"; } case (_) { - ns = Int.to_str(n, 10u) + " bottles"; + ns = _int::to_str(n, 10u) + " bottles"; } } - while (i < Str.byte_len(t)) { + while (i < _str::byte_len(t)) { if (t.(i) == ('#' as u8)) { b += ns; } else { - Str.push_byte(b, t.(i)); + _str::push_byte(b, t.(i)); } i += 1u; } diff --git a/src/test/bench/99-bottles/99bob-tail.rs b/src/test/bench/99-bottles/99bob-tail.rs index 985d9b4b..202b653b 100644 --- a/src/test/bench/99-bottles/99bob-tail.rs +++ b/src/test/bench/99-bottles/99bob-tail.rs @@ -1,15 +1,15 @@ -/* -*- mode:rust;indent-tabs-mode:nil -*- +/* -*- mode::rust;indent-tabs-mode::nil -*- * Implementation of 99 Bottles of Beer * http://99-bottles-of-beer.net/ */ use std; -import std.Int; -import std.Str; +import std::_int; +import std::_str; fn main() { fn multiple(int n) { - let str nb = Int.to_str(n, 10u); - let str mb = Int.to_str(n - 1, 10u); + let str nb = _int::to_str(n, 10u); + let str mb = _int::to_str(n - 1, 10u); log nb + " bottles of beer on the wall, " + nb + " bottles of beer,"; log "Take one down and pass it around, " + mb + " bottles of beer on the wall."; |