Fix docs: There is no default width anymore.

This commit is contained in:
Andreas Fackler 2018-11-23 13:38:20 +01:00
parent 606bdb3348
commit 8af893b0f2
2 changed files with 2 additions and 2 deletions

View File

@ -9,7 +9,7 @@ let bytes: &[u8] = &[0x0a, 0x1b, 0x2c, 0x3d, 0x4e, 0x5f];
assert_eq!("0a1b2c3d4e5f", &format!("{}", HexFmt(bytes)));
// The default width is 10. Change it to apply padding or shortening.
// By default the full slice is printed. Change the width to apply padding or shortening.
assert_eq!("0a..5f", &format!("{:6}", HexFmt(bytes)));
assert_eq!("0a1b2c3d4e5f", &format!("{:12}", HexFmt(bytes)));
assert_eq!(" 0a1b2c3d4e5f ", &format!("{:16}", HexFmt(bytes)));

View File

@ -10,7 +10,7 @@
//!
//! assert_eq!("0a1b2c3d4e5f", &format!("{}", HexFmt(bytes)));
//!
//! // The default width is 10. Change it to apply padding or shortening.
//! // By default the full slice is printed. Change the width to apply padding or shortening.
//! assert_eq!("0a..5f", &format!("{:6}", HexFmt(bytes)));
//! assert_eq!("0a1b2c3d4e5f", &format!("{:12}", HexFmt(bytes)));
//! assert_eq!(" 0a1b2c3d4e5f ", &format!("{:16}", HexFmt(bytes)));