diff options
| author | Alex Crichton <alex@alexcrichton.com> | 2013-09-24 22:16:43 -0700 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2013-09-26 17:05:59 -0700 |
| commit | 409182de6d74889134209e7fc98174eb8f267170 (patch) | |
| tree | 8f8c542b198cdb323038aa803ff6bff7433bd3bb /src/libextra | |
| parent | 09a53381974bcf42c0b081cbfcd9f20f1e5d4f04 (diff) | |
| download | rust-409182de6d74889134209e7fc98174eb8f267170.tar.gz rust-409182de6d74889134209e7fc98174eb8f267170.zip | |
Update the compiler to not use printf/printfln
Diffstat (limited to 'src/libextra')
| -rw-r--r-- | src/libextra/base64.rs | 8 | ||||
| -rw-r--r-- | src/libextra/future.rs | 2 | ||||
| -rw-r--r-- | src/libextra/getopts.rs | 2 | ||||
| -rw-r--r-- | src/libextra/hex.rs | 8 | ||||
| -rw-r--r-- | src/libextra/task_pool.rs | 2 |
5 files changed, 11 insertions, 11 deletions
diff --git a/src/libextra/base64.rs b/src/libextra/base64.rs index f26554c42f4..7a113f1a292 100644 --- a/src/libextra/base64.rs +++ b/src/libextra/base64.rs @@ -68,7 +68,7 @@ impl<'self> ToBase64 for &'self [u8] { * * fn main () { * let str = [52,32].to_base64(standard); - * printfln!("%s", str); + * println!("{}", str); * } * ``` */ @@ -177,11 +177,11 @@ impl<'self> FromBase64 for &'self str { * * fn main () { * let hello_str = "Hello, World".to_base64(standard); - * printfln!("%s", hello_str); + * println!("{}", hello_str); * let bytes = hello_str.from_base64(); - * printfln!("%?", bytes); + * println!("{:?}", bytes); * let result_str = str::from_utf8(bytes); - * printfln!("%s", result_str); + * println!("{}", result_str); * } * ``` */ diff --git a/src/libextra/future.rs b/src/libextra/future.rs index 72c6db6fb72..fdb296e5f40 100644 --- a/src/libextra/future.rs +++ b/src/libextra/future.rs @@ -19,7 +19,7 @@ * # fn make_a_sandwich() {}; * let mut delayed_fib = extra::future::spawn (|| fib(5000) ); * make_a_sandwich(); - * printfln!("fib(5000) = %?", delayed_fib.get()) + * println!("fib(5000) = {}", delayed_fib.get()) * ``` */ diff --git a/src/libextra/getopts.rs b/src/libextra/getopts.rs index f73c34224ee..aa37c78cc57 100644 --- a/src/libextra/getopts.rs +++ b/src/libextra/getopts.rs @@ -43,7 +43,7 @@ //! } //! //! fn print_usage(program: &str, _opts: &[Opt]) { -//! printfln!("Usage: %s [options]", program); +//! println!("Usage: {} [options]", program); //! println("-o\t\tOutput"); //! println("-h --help\tUsage"); //! } diff --git a/src/libextra/hex.rs b/src/libextra/hex.rs index d5b89cafced..ad812513f84 100644 --- a/src/libextra/hex.rs +++ b/src/libextra/hex.rs @@ -33,7 +33,7 @@ impl<'self> ToHex for &'self [u8] { * * fn main () { * let str = [52,32].to_hex(); - * printfln!("%s", str); + * println!("{}", str); * } * ``` */ @@ -77,11 +77,11 @@ impl<'self> FromHex for &'self str { * * fn main () { * let hello_str = "Hello, World".to_hex(); - * printfln!("%s", hello_str); + * println!("{}", hello_str); * let bytes = hello_str.from_hex().unwrap(); - * printfln!("%?", bytes); + * println!("{:?}", bytes); * let result_str = str::from_utf8(bytes); - * printfln!("%s", result_str); + * println!("{}", result_str); * } * ``` */ diff --git a/src/libextra/task_pool.rs b/src/libextra/task_pool.rs index 46244c15a83..804ccd2a9fd 100644 --- a/src/libextra/task_pool.rs +++ b/src/libextra/task_pool.rs @@ -103,6 +103,6 @@ fn test_task_pool() { }; let mut pool = TaskPool::new(4, Some(SingleThreaded), f); do 8.times { - pool.execute(|i| printfln!("Hello from thread %u!", *i)); + pool.execute(|i| println!("Hello from thread {}!", *i)); } } |
