From aa9fdf56bf41ac7d6fd603314f73c5ec0ced3d41 Mon Sep 17 00:00:00 2001 From: Jay Oster Date: Sun, 6 Oct 2019 02:31:29 -0700 Subject: [PATCH] Enable clippy and tests on the entire workspace --- .travis.yml | 4 ++-- simple-invaders/src/lib.rs | 6 ++++++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 4cecab1..23bda33 100644 --- a/.travis.yml +++ b/.travis.yml @@ -16,6 +16,6 @@ before_script: - rustup component add rustfmt script: -- cargo clippy -- -D warnings -- cargo test +- cargo clippy --workspace -- -D warnings +- cargo test --workspace - cargo fmt --all -- --check diff --git a/simple-invaders/src/lib.rs b/simple-invaders/src/lib.rs index 513ed97..599d9a7 100644 --- a/simple-invaders/src/lib.rs +++ b/simple-invaders/src/lib.rs @@ -228,6 +228,12 @@ impl World { } } +impl Default for World { + fn default() -> Self { + World::new() + } +} + impl Point { const fn new(x: usize, y: usize) -> Point { Point { x, y }