mirror of
https://github.com/servo/servo.git
synced 2025-07-23 23:33:43 +01:00
clippy: Fix issues in components/fonts
and ports/servoshell
(#33809)
* fix linting issues Signed-off-by: mercybassey <udohmercy911@gmail.com> adding '-s' * Remove a pair of unecessary parenethesis Signed-off-by: Martin Robinson <mrobinson@igalia.com> --------- Signed-off-by: Martin Robinson <mrobinson@igalia.com> Co-authored-by: Martin Robinson <mrobinson@igalia.com>
This commit is contained in:
parent
20a15619f0
commit
e09362cd3c
3 changed files with 4 additions and 4 deletions
|
@ -45,7 +45,7 @@ impl FontData {
|
||||||
|
|
||||||
impl AsRef<[u8]> for FontData {
|
impl AsRef<[u8]> for FontData {
|
||||||
fn as_ref(&self) -> &[u8] {
|
fn as_ref(&self) -> &[u8] {
|
||||||
&**self.0
|
&self.0
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -69,6 +69,6 @@ impl LocalFontIdentifier {
|
||||||
pub(crate) fn read_data_from_file(&self) -> Option<Vec<u8>> {
|
pub(crate) fn read_data_from_file(&self) -> Option<Vec<u8>> {
|
||||||
let file = File::open(Path::new(&*self.path)).ok()?;
|
let file = File::open(Path::new(&*self.path)).ok()?;
|
||||||
let mmap = unsafe { Mmap::map(&file).ok()? };
|
let mmap = unsafe { Mmap::map(&file).ok()? };
|
||||||
Some((&mmap[..]).to_vec())
|
Some(mmap[..].to_vec())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -80,7 +80,7 @@ impl App {
|
||||||
} else {
|
} else {
|
||||||
Rc::new(headed_window::Window::new(
|
Rc::new(headed_window::Window::new(
|
||||||
opts::get().initial_window_size,
|
opts::get().initial_window_size,
|
||||||
&events_loop.as_winit(),
|
events_loop.as_winit(),
|
||||||
no_native_titlebar,
|
no_native_titlebar,
|
||||||
device_pixel_ratio_override,
|
device_pixel_ratio_override,
|
||||||
))
|
))
|
||||||
|
@ -118,7 +118,7 @@ impl App {
|
||||||
app.minibrowser = Some(
|
app.minibrowser = Some(
|
||||||
Minibrowser::new(
|
Minibrowser::new(
|
||||||
&rendering_context,
|
&rendering_context,
|
||||||
&events_loop.as_winit(),
|
events_loop.as_winit(),
|
||||||
initial_url.clone(),
|
initial_url.clone(),
|
||||||
)
|
)
|
||||||
.into(),
|
.into(),
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue