Add explicit clippy deny all, and forbid unsafe code (where possible) (#38)

This commit is contained in:
Jay Oster 2019-11-06 21:16:25 -08:00 committed by GitHub
parent e0225c145d
commit a92adf1b12
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 13 additions and 2 deletions

View file

@ -30,13 +30,13 @@ byteorder = "1.3"
env_logger = "0.7"
getrandom = "0.1"
gilrs = "0.7"
line_drawing = "0.8"
log = { version = "0.4", features = ["release_max_level_warn"] }
pixels-mocks = { path = "pixels-mocks" }
randomize = "3.0"
simple-invaders = { path = "simple-invaders" }
winit = "0.20.0-alpha4"
winit_input_helper = "0.4.0-alpha4"
randomize = "3.0"
line_drawing = "0.8"
[workspace]
members = [

View file

@ -1,3 +1,6 @@
#![deny(clippy::all)]
#![forbid(unsafe_code)]
use log::debug;
use pixels::{Error, Pixels, SurfaceTexture};
use winit::dpi::{LogicalPosition, LogicalSize, PhysicalSize};

View file

@ -1,3 +1,6 @@
#![deny(clippy::all)]
#![forbid(unsafe_code)]
use std::env;
use std::time::Instant;

View file

@ -1,3 +1,5 @@
#![deny(clippy::all)]
pub struct RWH;
unsafe impl raw_window_handle::HasRawWindowHandle for RWH {

View file

@ -4,6 +4,9 @@
//! this in practice. That said, the game is fully functional, and it should not be too difficult
//! to understand the code.
#![deny(clippy::all)]
#![forbid(unsafe_code)]
use std::time::Duration;
use crate::collision::Collision;