diff options
| author | Tim Chevalier <chevalier@alum.wellesley.edu> | 2012-10-02 11:37:37 -0700 |
|---|---|---|
| committer | Tim Chevalier <chevalier@alum.wellesley.edu> | 2012-10-02 14:31:39 -0700 |
| commit | f78cdcb6364cf938bfeb71da0c7eca62e257d537 (patch) | |
| tree | cb3f93224e4757b5f77709e576ca6f24ce0981ec /src/libcore/extfmt.rs | |
| parent | a5042d58ee86af13b6910fa1884b7c1fe9423ae7 (diff) | |
| download | rust-f78cdcb6364cf938bfeb71da0c7eca62e257d537.tar.gz rust-f78cdcb6364cf938bfeb71da0c7eca62e257d537.zip | |
Removing explicit uses of + mode
This removes most explicit uses of the + argument mode. Pending a snapshot, I had to remove the forbid(deprecated_modes) pragma from a bunch of files. I'll put it back! + mode still has to be used in a few places for functions that get moved (see task.rs) The changes outside core and std are due to the to_bytes trait and making the compiler (with legacy modes on) agree with the libraries (with legacy modes off) about modes.
Diffstat (limited to 'src/libcore/extfmt.rs')
| -rw-r--r-- | src/libcore/extfmt.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/libcore/extfmt.rs b/src/libcore/extfmt.rs index 25f92e61726..e10ff4bac71 100644 --- a/src/libcore/extfmt.rs +++ b/src/libcore/extfmt.rs @@ -87,7 +87,7 @@ mod ct { let mut pieces: ~[Piece] = ~[]; let lim = str::len(s); let mut buf = ~""; - fn flush_buf(+buf: ~str, pieces: &mut ~[Piece]) -> ~str { + fn flush_buf(buf: ~str, pieces: &mut ~[Piece]) -> ~str { if buf.len() > 0 { let piece = PieceString(move buf); pieces.push(move piece); @@ -323,7 +323,7 @@ mod rt { let mut s = str::from_char(c); return unsafe { pad(cv, s, PadNozero) }; } - pure fn conv_str(cv: Conv, +s: &str) -> ~str { + pure fn conv_str(cv: Conv, s: &str) -> ~str { // For strings, precision is the maximum characters // displayed let mut unpadded = match cv.precision { @@ -405,7 +405,7 @@ mod rt { pure fn ne(other: &PadMode) -> bool { !self.eq(other) } } - fn pad(cv: Conv, +s: ~str, mode: PadMode) -> ~str { + fn pad(cv: Conv, s: ~str, mode: PadMode) -> ~str { let mut s = move s; // sadtimes let uwidth : uint = match cv.width { CountImplied => return s, @@ -518,7 +518,7 @@ mod rt2 { let mut s = str::from_char(c); return unsafe { pad(cv, s, PadNozero) }; } - pure fn conv_str(cv: Conv, +s: &str) -> ~str { + pure fn conv_str(cv: Conv, s: &str) -> ~str { // For strings, precision is the maximum characters // displayed let mut unpadded = match cv.precision { @@ -600,7 +600,7 @@ mod rt2 { pure fn ne(other: &PadMode) -> bool { !self.eq(other) } } - fn pad(cv: Conv, +s: ~str, mode: PadMode) -> ~str { + fn pad(cv: Conv, s: ~str, mode: PadMode) -> ~str { let mut s = move s; // sadtimes let uwidth : uint = match cv.width { CountImplied => return s, |
