mirror of
https://github.com/servo/servo.git
synced 2025-07-22 23:03:42 +01:00
Make DOMString a newtype around String, rather than a typedef.
This should make it somewhat easier to experiment with alternative representations in the future. To reduce churn, this commit leaves the String field public, though. Also, this will allow us to use the default String type to represent the IDL USVString type, which explicitly forbids unpaired surrogates, ans as such is a better match to the Rust String type.
This commit is contained in:
parent
e6aa976462
commit
6b75078503
83 changed files with 393 additions and 297 deletions
|
@ -20,7 +20,7 @@ impl CSS {
|
|||
return Err(Error::InvalidCharacter);
|
||||
}
|
||||
let mut escaped = DOMString::new();
|
||||
serialize_identifier(&ident, &mut escaped).unwrap();
|
||||
serialize_identifier(&ident, &mut escaped.0).unwrap();
|
||||
Ok(escaped)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue