Don't allow newtype structs to be dereferenced. #6246
This commit is contained in:
parent
18cef3fad4
commit
3b1862a82f
78 changed files with 594 additions and 674 deletions
|
@ -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() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue