Skip to content

Commit 79e6ab5

Browse files
committed
std: Avoid using "{:?}" in format strings
This removes all usage of Poly in format strings from libstd. This doesn't prevent more future strings from coming in, but it at least removes the ones for now.
1 parent d89074c commit 79e6ab5

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

src/libnative/io/process.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -470,7 +470,7 @@ fn spawn_process_os(config: p::ProcessConfig,
470470
Err(e) => {
471471
assert!(e.kind == io::BrokenPipe ||
472472
e.kind == io::EndOfFile,
473-
"unexpected error: {:?}", e);
473+
"unexpected error: {}", e);
474474
Ok(SpawnProcessResult {
475475
pid: pid,
476476
handle: ptr::null()
@@ -744,7 +744,7 @@ fn waitpid(pid: pid_t) -> p::ProcessExit {
744744

745745
let mut status = 0 as c_int;
746746
match retry(|| unsafe { wait::waitpid(pid, &mut status, 0) }) {
747-
-1 => fail!("unknown waitpid error: {:?}", super::last_error()),
747+
-1 => fail!("unknown waitpid error: {}", super::last_error()),
748748
_ => {
749749
if imp::WIFEXITED(status) {
750750
p::ExitStatus(imp::WEXITSTATUS(status) as int)

src/libstd/num/strconv.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -532,19 +532,19 @@ pub fn from_str_bytes_common<T:NumCast+Zero+One+Eq+Ord+Div<T,T>+
532532
) -> Option<T> {
533533
match exponent {
534534
ExpDec if radix >= DIGIT_E_RADIX // decimal exponent 'e'
535-
=> fail!("from_str_bytes_common: radix {:?} incompatible with \
535+
=> fail!("from_str_bytes_common: radix {} incompatible with \
536536
use of 'e' as decimal exponent", radix),
537537
ExpBin if radix >= DIGIT_P_RADIX // binary exponent 'p'
538-
=> fail!("from_str_bytes_common: radix {:?} incompatible with \
538+
=> fail!("from_str_bytes_common: radix {} incompatible with \
539539
use of 'p' as binary exponent", radix),
540540
_ if special && radix >= DIGIT_I_RADIX // first digit of 'inf'
541-
=> fail!("from_str_bytes_common: radix {:?} incompatible with \
541+
=> fail!("from_str_bytes_common: radix {} incompatible with \
542542
special values 'inf' and 'NaN'", radix),
543543
_ if (radix as int) < 2
544-
=> fail!("from_str_bytes_common: radix {:?} to low, \
544+
=> fail!("from_str_bytes_common: radix {} to low, \
545545
must lie in the range [2, 36]", radix),
546546
_ if (radix as int) > 36
547-
=> fail!("from_str_bytes_common: radix {:?} to high, \
547+
=> fail!("from_str_bytes_common: radix {} to high, \
548548
must lie in the range [2, 36]", radix),
549549
_ => ()
550550
}

0 commit comments

Comments
 (0)