Fix docs: There is no default width anymore.
This commit is contained in:
parent
606bdb3348
commit
8af893b0f2
|
@ -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)));
|
||||
|
|
|
@ -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)));
|
||||
|
|
Loading…
Reference in New Issue