mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Slice some fixed-size arrays.
This commit is contained in:
parent
af9a8bdc73
commit
121904dd89
3 changed files with 4 additions and 4 deletions
|
@ -557,7 +557,7 @@ impl<'a> GlyphStore {
|
|||
(true, _) => GlyphEntry::missing(1),
|
||||
(false, true) => GlyphEntry::simple(data.id, data.advance),
|
||||
(false, false) => {
|
||||
let glyph = [DetailedGlyph::new(data.id, data.advance, data.offset)];
|
||||
let glyph = &[DetailedGlyph::new(data.id, data.advance, data.offset)];
|
||||
self.detail_store.add_detailed_glyphs_for_entry(i, glyph);
|
||||
GlyphEntry::complex(data.cluster_start, data.ligature_start, 1)
|
||||
}
|
||||
|
|
|
@ -674,7 +674,7 @@ def getJSToNativeConversionTemplate(type, descriptorProvider, failureCode=None,
|
|||
default = "None"
|
||||
else:
|
||||
assert defaultValue.type.tag() == IDLType.Tags.domstring
|
||||
value = "str::from_utf8(data).unwrap().into_string()"
|
||||
value = "str::from_utf8(&data).unwrap().into_string()"
|
||||
if type.nullable():
|
||||
value = "Some(%s)" % value
|
||||
|
||||
|
|
|
@ -299,7 +299,7 @@ impl Stylist {
|
|||
// (Does it make a difference?)
|
||||
for &filename in ["user-agent.css", "servo.css", "presentational-hints.css"].iter() {
|
||||
let ua_stylesheet = Stylesheet::from_bytes(
|
||||
read_resource_file([filename]).unwrap().as_slice(),
|
||||
read_resource_file(&[filename]).unwrap().as_slice(),
|
||||
Url::parse(format!("chrome:///{}", filename).as_slice()).unwrap(),
|
||||
None,
|
||||
None,
|
||||
|
@ -391,7 +391,7 @@ impl Stylist {
|
|||
|
||||
pub fn add_quirks_mode_stylesheet(&mut self) {
|
||||
self.add_stylesheet(Stylesheet::from_bytes(
|
||||
read_resource_file(["quirks-mode.css"]).unwrap().as_slice(),
|
||||
read_resource_file(&["quirks-mode.css"]).unwrap().as_slice(),
|
||||
Url::parse("chrome:///quirks-mode.css").unwrap(),
|
||||
None,
|
||||
None,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue