1
Fork 0

Don't allow newtype structs to be dereferenced. #6246

This commit is contained in:
Brian Anderson 2013-11-01 18:06:31 -07:00
parent 18cef3fad4
commit 3b1862a82f
78 changed files with 594 additions and 674 deletions

View file

@ -23,6 +23,7 @@ impl<'a> fmt::Default for Escape<'a> {
fn fmt(s: &Escape<'a>, fmt: &mut fmt::Formatter) {
// Because the internet is always right, turns out there's not that many
// characters to escape: http://stackoverflow.com/questions/7381974
let Escape(s) = *s;
let pile_o_bits = s.as_slice();
let mut last = 0;
for (i, ch) in s.bytes().enumerate() {