diff options
| author | Alex Crichton <alex@alexcrichton.com> | 2013-09-27 17:02:31 -0700 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2013-09-30 23:21:18 -0700 |
| commit | a8ba31dbf3e7d80a069bc486a35eff8357282b68 (patch) | |
| tree | 8a00829d527c443d16988b98cd7c97f1d3d4dac6 /src/libstd/unstable/dynamic_lib.rs | |
| parent | aaf6cc3a841095a95a9c74a6a2a3709dffd7a4e9 (diff) | |
std: Remove usage of fmt!
Diffstat (limited to 'src/libstd/unstable/dynamic_lib.rs')
| -rw-r--r-- | src/libstd/unstable/dynamic_lib.rs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/libstd/unstable/dynamic_lib.rs b/src/libstd/unstable/dynamic_lib.rs index 41ff79bc884..0045aef06f1 100644 --- a/src/libstd/unstable/dynamic_lib.rs +++ b/src/libstd/unstable/dynamic_lib.rs @@ -33,7 +33,7 @@ impl Drop for DynamicLibrary { } } { Ok(()) => {}, - Err(str) => fail!(str) + Err(str) => fail2!("{}", str) } } } @@ -96,7 +96,7 @@ mod test { // The math library does not need to be loaded since it is already // statically linked in let libm = match DynamicLibrary::open(None) { - Err(error) => fail!("Could not load self as module: %s", error), + Err(error) => fail2!("Could not load self as module: {}", error), Ok(libm) => libm }; @@ -104,7 +104,7 @@ mod test { // this as a C function let cosine: extern fn(libc::c_double) -> libc::c_double = unsafe { match libm.symbol("cos") { - Err(error) => fail!("Could not load function cos: %s", error), + Err(error) => fail2!("Could not load function cos: {}", error), Ok(cosine) => cosine } }; @@ -113,7 +113,7 @@ mod test { let expected_result = 1.0; let result = cosine(argument); if result != expected_result { - fail!("cos(%?) != %? but equaled %? instead", argument, + fail2!("cos({:?}) != {:?} but equaled {:?} instead", argument, expected_result, result) } } @@ -129,7 +129,7 @@ mod test { let path = GenericPath::from_str("/dev/null"); match DynamicLibrary::open(Some(&path)) { Err(_) => {} - Ok(_) => fail!("Successfully opened the empty library.") + Ok(_) => fail2!("Successfully opened the empty library.") } } } @@ -241,7 +241,7 @@ pub mod dl { if 0 == error { Ok(result) } else { - Err(fmt!("Error code %?", error)) + Err(format!("Error code {}", error)) } } } |
