Run clippy on CI

Fixes #1402.
This commit is contained in:
Kirill Chibisov 2022-06-10 13:43:33 +03:00 committed by GitHub
parent 57981b533d
commit 10419ff441
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
72 changed files with 377 additions and 312 deletions

View file

@ -36,11 +36,11 @@ impl Window {
let id = target.generate_id();
let canvas = backend::Canvas::create(platform_attr)?;
let mut canvas = Rc::new(RefCell::new(canvas));
let canvas = Rc::new(RefCell::new(canvas));
let register_redraw_request = Box::new(move || runner.request_redraw(RootWI(id)));
target.register(&mut canvas, id);
target.register(&canvas, id);
let runner = target.runner.clone();
let resize_notify_fn = Box::new(move |new_size| {
@ -77,7 +77,7 @@ impl Window {
Ok(window)
}
pub fn canvas<'a>(&'a self) -> Ref<'a, backend::Canvas> {
pub fn canvas(&self) -> Ref<'_, backend::Canvas> {
self.canvas.borrow()
}
@ -220,7 +220,7 @@ impl Window {
self.canvas
.borrow()
.set_cursor_grab(grab)
.map_err(|e| ExternalError::Os(e))
.map_err(ExternalError::Os)
}
#[inline]
@ -344,7 +344,7 @@ impl Window {
#[inline]
pub fn id(&self) -> WindowId {
return self.id;
self.id
}
#[inline]