Skip to content
This repository was archived by the owner on Nov 9, 2017. It is now read-only.

Commit 0cb4b84

Browse files
committed
s/println\(/println!(/ because rust-lang/rust#11416
(I’m getting good at concise commit messages, aren’t I?)
1 parent 4e35a9f commit 0cb4b84

File tree

6 files changed

+18
-18
lines changed

6 files changed

+18
-18
lines changed

src/codegen/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ fn main() {
1414
let args = os::args();
1515
match args.len() {
1616
0 => {
17-
println("usage: codegen [read_method|status].rs <output-dir>");
17+
println!("usage: codegen [read_method|status].rs <output-dir>");
1818
os::set_exit_status(1);
1919
},
2020
3 => {

src/examples/client/main.rs

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -24,31 +24,31 @@ fn main() {
2424
fn make_and_print_request(url: ~str) {
2525
let request = RequestWriter::new(Get, from_str(url).expect("Invalid URL :-("));
2626

27-
println("[33;1mRequest[0m");
28-
println("[33;1m=======[0m");
29-
println("");
27+
println!("[33;1mRequest[0m");
28+
println!("[33;1m=======[0m");
29+
println!("");
3030
println!("URL: {}", request.url.to_str());
3131
println!("Remote address: {:?}", request.remote_addr);
3232
println!("Method: {}", request.method);
33-
println("[1mHeaders:[0m");
33+
println!("[1mHeaders:[0m");
3434
for header in request.headers.iter() {
3535
println!(" - {}: {}", header.header_name(), header.header_value());
3636
}
3737

38-
println("");
39-
println("[33;1mResponse[0m");
40-
println("[33;1m========[0m");
41-
println("");
38+
println!("");
39+
println!("[33;1mResponse[0m");
40+
println!("[33;1m========[0m");
41+
println!("");
4242
let mut response = match request.read_response() {
4343
Ok(response) => response,
4444
Err(_request) => fail!("This example can progress no further with no response :-("),
4545
};
4646
println!("Status: {}", response.status);
47-
println("[1mHeaders:[0m");
47+
println!("[1mHeaders:[0m");
4848
for header in response.headers.iter() {
4949
println!(" - {}: {}", header.header_name(), header.header_value());
5050
}
51-
println("[1mBody:[0m");
51+
println!("[1mBody:[0m");
5252
let body = response.read_to_end();
53-
println(str::from_utf8(body));
53+
println!(str::from_utf8(body));
5454
}

src/http/client/request.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ use client::response::ResponseReader;
5555
match stream.read(buf) {
5656
None => fail!("Read error :-("), // conditions for error interception, again
5757
Some(bytes_read) => {
58-
println(str::from_bytes(buf.slice_to(bytes_read)));
58+
println!(str::from_bytes(buf.slice_to(bytes_read)));
5959
}
6060
}
6161

src/http/client/response.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ impl<S: Stream> ResponseReader<S> {
121121
return Err(request);
122122
},
123123
Err(MalformedHeaderValue) => {
124-
println("Bad header encountered. TODO: handle this better.");
124+
println!("Bad header encountered. TODO: handle this better.");
125125
// Now just ignore the header
126126
},
127127
Ok(header) => {

src/http/server/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ fn perf_dumper(perf_po: Port<(u64, u64, u64, u64, u64)>) {
135135
td_total += finished - start;
136136
i += 1;
137137
if i % PERF_DUMP_FREQUENCY == 0 {
138-
println("");
138+
println!("");
139139
println!("{} requests made thus far. Current means:", i);
140140
println!("- Total: 100%, {:12f}",
141141
td_total as f64 / i as f64);

src/http/server/request.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -316,11 +316,11 @@ impl Request {
316316
Err(EndOfFile) => fail!("client disconnected, nowhere to send response"),
317317
Err(EndOfHeaders) => break,
318318
Err(MalformedHeaderSyntax) => {
319-
println("BAD REQUEST: malformed header (TODO: is this right?)");
319+
println!("BAD REQUEST: malformed header (TODO: is this right?)");
320320
return (request, Err(status::BadRequest));
321321
},
322322
Err(MalformedHeaderValue) => {
323-
println("Bad header encountered. TODO: handle this better.");
323+
println!("Bad header encountered. TODO: handle this better.");
324324
// Now just ignore the header
325325
},
326326
Ok(header) => {
@@ -331,7 +331,7 @@ impl Request {
331331

332332
// HTTP/1.0 doesn't have Host, but HTTP/1.1 requires it
333333
if request.version == (1, 1) && request.headers.host.is_none() {
334-
println("BAD REQUEST: host is none for HTTP/1.1 request");
334+
println!("BAD REQUEST: host is none for HTTP/1.1 request");
335335
return (request, Err(status::BadRequest));
336336
}
337337

0 commit comments

Comments
 (0)