Skip to content

Commit dbd150f

Browse files
author
Thomas Bahn
committed
Miscellaneous cleanups
1 parent 5554a23 commit dbd150f

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

src/lib.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ impl fmt::Display for Ascii {
123123

124124
impl fmt::Display for Vec<Ascii> {
125125
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
126-
fmt::Display::fmt(&self[], f)
126+
fmt::Display::fmt(&self[..], f)
127127
}
128128
}
129129

@@ -139,14 +139,14 @@ impl fmt::Debug for Ascii {
139139
}
140140
}
141141

142-
// TODO: The following impls conflict with the generic impls in std.
143-
// impl fmt::Show for Vec<Ascii> {
142+
// NOTE: The following impls conflict with the generic impls in std.
143+
// impl fmt::Debug for Vec<Ascii> {
144144
// fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
145-
// fmt::Show::fmt(&self[], f)
145+
// fmt::Show::fmt(&self[..], f)
146146
// }
147147
// }
148148

149-
// impl fmt::Show for [Ascii] {
149+
// impl fmt::Debug for [Ascii] {
150150
// fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
151151
// fmt::Show::fmt(self.as_str(), f)
152152
// }
@@ -340,8 +340,8 @@ mod tests {
340340
assert_eq!(test.to_ascii().unwrap(), b);
341341
assert_eq!("( ;".to_ascii().unwrap(), b);
342342
let v = vec![40u8, 32u8, 59u8];
343-
assert_eq!(v.as_slice().to_ascii().unwrap(), b);
344-
assert_eq!("( ;".to_string().as_slice().to_ascii().unwrap(), b);
343+
assert_eq!(v.to_ascii().unwrap(), b);
344+
assert_eq!("( ;".to_string().to_ascii().unwrap(), b);
345345
}
346346

347347
#[test]
@@ -416,7 +416,7 @@ mod tests {
416416
}
417417

418418
#[test]
419-
fn fmt_show_ascii() {
419+
fn fmt_debug_ascii() {
420420
let c = Ascii { chr: b't' };
421421
assert_eq!(format!("{:?}", c), "'t'".to_string());
422422
}

0 commit comments

Comments
 (0)