Skip to content

Commit 2c658fa

Browse files
committed
std: remove prettyprint
Everyone uses fmt!("%?", ...) instead of the prettyprint module, so I'm removing this file.
1 parent b05e148 commit 2c658fa

File tree

3 files changed

+0
-221
lines changed

3 files changed

+0
-221
lines changed

src/libstd/prettyprint.rs

Lines changed: 0 additions & 199 deletions
This file was deleted.

src/libstd/std.rc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,6 @@ pub mod md4;
8888
pub mod tempfile;
8989
pub mod term;
9090
pub mod time;
91-
pub mod prettyprint;
9291
pub mod arena;
9392
pub mod par;
9493
pub mod cmp;

src/test/run-pass/auto-encode.rs

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -22,21 +22,9 @@ use EBWriter = std::ebml::writer;
2222
use core::cmp::Eq;
2323
use core::io::Writer;
2424
use std::ebml;
25-
use std::prettyprint;
2625
use std::serialize::{Encodable, Decodable};
2726
use std::time;
2827

29-
fn test_prettyprint<A:Encodable<prettyprint::Serializer>>(
30-
a: &A,
31-
expected: &~str
32-
) {
33-
let s = do io::with_str_writer |w| {
34-
a.encode(&prettyprint::Serializer(w))
35-
};
36-
debug!("s == %?", s);
37-
fail_unless!(s == *expected);
38-
}
39-
4028
fn test_ebml<A:
4129
Eq +
4230
Encodable<EBWriter::Encoder> +
@@ -149,36 +137,27 @@ enum CLike { A, B, C }
149137

150138
pub fn main() {
151139
let a = &Plus(@Minus(@Val(3u), @Val(10u)), @Plus(@Val(22u), @Val(5u)));
152-
test_prettyprint(a, &~"Plus(@Minus(@Val(3u), @Val(10u)), \
153-
@Plus(@Val(22u), @Val(5u)))");
154140
test_ebml(a);
155141

156142
let a = &Spanned {lo: 0u, hi: 5u, node: 22u};
157-
test_prettyprint(a, &~"Spanned {lo: 0u, hi: 5u, node: 22u}");
158143
test_ebml(a);
159144

160145
let a = &Point {x: 3u, y: 5u};
161-
test_prettyprint(a, &~"Point {x: 3u, y: 5u}");
162146
test_ebml(a);
163147

164148
let a = &@[1u, 2u, 3u];
165-
test_prettyprint(a, &~"@[1u, 2u, 3u]");
166149
test_ebml(a);
167150

168151
let a = &Top(22u);
169-
test_prettyprint(a, &~"Top(22u)");
170152
test_ebml(a);
171153

172154
let a = &Bottom(222u);
173-
test_prettyprint(a, &~"Bottom(222u)");
174155
test_ebml(a);
175156

176157
let a = &A;
177-
test_prettyprint(a, &~"A");
178158
test_ebml(a);
179159

180160
let a = &B;
181-
test_prettyprint(a, &~"B");
182161
test_ebml(a);
183162

184163
let a = &time::now();

0 commit comments

Comments
 (0)