Skip to content

Commit

Permalink
clippy: Apply clipping suggestions (servo#31500)
Browse files Browse the repository at this point in the history
  • Loading branch information
andbi-redpill committed May 17, 2024
1 parent 1017533 commit 6f4322a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
6 changes: 3 additions & 3 deletions components/gfx/platform/freetype/font.rs
Original file line number Diff line number Diff line change
Expand Up @@ -447,8 +447,8 @@ impl FreeTypeFaceHelpers for FT_Face {
let requested_size = (requested_size.to_f64_px() * 64.0) as i64;
let get_size_at_index = |index| unsafe {
(
(*(*self).available_sizes.offset(index as isize)).x_ppem as i64,
(*(*self).available_sizes.offset(index as isize)).y_ppem as i64,
(*(*self).available_sizes.offset(index as isize)).x_ppem,
(*(*self).available_sizes.offset(index as isize)).y_ppem,
)
};

Expand All @@ -470,7 +470,7 @@ impl FreeTypeFaceHelpers for FT_Face {
}

if succeeded(unsafe { FT_Select_Size(self, best_index) }) {
return Ok(Au::from_f64_px(best_size.1 as f64 / 64.0));
Ok(Au::from_f64_px(best_size.1 as f64 / 64.0))
} else {
Err("FT_Select_Size failed")
}
Expand Down
4 changes: 3 additions & 1 deletion components/script/dom/baseaudiocontext.rs
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,8 @@ struct DecodeResolver {
pub error_callback: Option<Rc<DecodeErrorCallback>>,
}

type DomPromisesQueue = DomRefCell<VecDeque<(Box<[Rc<Promise>]>, ErrorResult)>>;

#[dom_struct]
pub struct BaseAudioContext {
eventtarget: EventTarget,
Expand All @@ -90,7 +92,7 @@ pub struct BaseAudioContext {
listener: MutNullableDom<AudioListener>,
/// Resume promises which are soon to be fulfilled by a queued task.
#[ignore_malloc_size_of = "promises are hard"]
in_flight_resume_promises_queue: DomRefCell<VecDeque<(Box<[Rc<Promise>]>, ErrorResult)>>,
in_flight_resume_promises_queue: DomPromisesQueue,
/// <https://webaudio.github.io/web-audio-api/#pendingresumepromises>
#[ignore_malloc_size_of = "promises are hard"]
pending_resume_promises: DomRefCell<Vec<Rc<Promise>>>,
Expand Down

0 comments on commit 6f4322a

Please sign in to comment.