mirror of
https://github.com/servo/servo.git
synced 2025-08-06 22:15:33 +01:00
Remove redundant .clone()
s
This commit is contained in:
parent
eeaca0b26d
commit
c44a2febe6
19 changed files with 31 additions and 35 deletions
|
@ -405,7 +405,7 @@ impl FontCache {
|
|||
match (template.bytes_if_in_memory(), template.native_font()) {
|
||||
(Some(bytes), _) => txn.add_raw_font(font_key, bytes, 0),
|
||||
(None, Some(native_font)) => txn.add_native_font(font_key, native_font),
|
||||
(None, None) => txn.add_raw_font(font_key, template.bytes().clone(), 0),
|
||||
(None, None) => txn.add_raw_font(font_key, template.bytes(), 0),
|
||||
}
|
||||
webrender_api.update_resources(txn.resource_updates);
|
||||
font_key
|
||||
|
|
|
@ -195,7 +195,7 @@ impl<S: FontSource> FontContext<S> {
|
|||
.get_font_instance(info.font_key, actual_pt_size);
|
||||
Ok(Font::new(
|
||||
handle,
|
||||
descriptor.to_owned(),
|
||||
descriptor,
|
||||
actual_pt_size,
|
||||
font_instance_key,
|
||||
))
|
||||
|
|
|
@ -143,7 +143,7 @@ impl FontHandleMethods for FontHandle {
|
|||
|
||||
let mut handle = FontHandle {
|
||||
face: face,
|
||||
font_data: template.clone(),
|
||||
font_data: template,
|
||||
handle: fctx.clone(),
|
||||
can_do_fast_shaping: false,
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue