chore(rustfmt): use nightly (#2325)
Stable rustfmt lacks a lot of features resulting in worse formatted code, thus use nightly formatter.
This commit is contained in:
parent
7006c7ceca
commit
7b0c7b6cb2
154 changed files with 3439 additions and 5891 deletions
|
|
@ -17,11 +17,7 @@ impl AnimationFrameHandler {
|
|||
move || handle.set(None)
|
||||
});
|
||||
|
||||
Self {
|
||||
window,
|
||||
closure,
|
||||
handle,
|
||||
}
|
||||
Self { window, closure, handle }
|
||||
}
|
||||
|
||||
pub fn on_animation_frame<F>(&mut self, mut f: F)
|
||||
|
|
@ -37,9 +33,7 @@ impl AnimationFrameHandler {
|
|||
|
||||
pub fn request(&self) {
|
||||
if let Some(handle) = self.handle.take() {
|
||||
self.window
|
||||
.cancel_animation_frame(handle)
|
||||
.expect("Failed to cancel animation frame");
|
||||
self.window.cancel_animation_frame(handle).expect("Failed to cancel animation frame");
|
||||
}
|
||||
|
||||
let handle = self
|
||||
|
|
@ -52,9 +46,7 @@ impl AnimationFrameHandler {
|
|||
|
||||
pub fn cancel(&mut self) {
|
||||
if let Some(handle) = self.handle.take() {
|
||||
self.window
|
||||
.cancel_animation_frame(handle)
|
||||
.expect("Failed to cancel animation frame");
|
||||
self.window.cancel_animation_frame(handle).expect("Failed to cancel animation frame");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -62,9 +54,7 @@ impl AnimationFrameHandler {
|
|||
impl Drop for AnimationFrameHandler {
|
||||
fn drop(&mut self) {
|
||||
if let Some(handle) = self.handle.take() {
|
||||
self.window
|
||||
.cancel_animation_frame(handle)
|
||||
.expect("Failed to cancel animation frame");
|
||||
self.window.cancel_animation_frame(handle).expect("Failed to cancel animation frame");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue