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

@ -94,6 +94,8 @@ impl<T> EventLoopBuilder<T> {
/// will fall back on X11. If this variable is set with any other value, winit will panic.
#[inline]
pub fn build(&mut self) -> EventLoop<T> {
// Certain platforms accept a mutable reference in their API.
#[allow(clippy::unnecessary_mut_passed)]
EventLoop {
event_loop: platform_impl::EventLoop::new(&mut self.platform_specific),
_marker: PhantomData,
@ -221,6 +223,12 @@ impl EventLoop<()> {
}
}
impl Default for EventLoop<()> {
fn default() -> Self {
Self::new()
}
}
impl<T> EventLoop<T> {
#[deprecated = "Use `EventLoopBuilder::<T>::with_user_event().build()` instead."]
pub fn with_user_event() -> EventLoop<T> {