diff --git a/.gitlab/CI/build.gitlab-ci.yml b/.gitlab/CI/build.gitlab-ci.yml index 67703b4149..c26e294029 100644 --- a/.gitlab/CI/build.gitlab-ci.yml +++ b/.gitlab/CI/build.gitlab-ci.yml @@ -21,16 +21,16 @@ benchmarks: max: 2 # Coverage is needed on master for the README.md badge to work -# tmp remove platform_intrinsics from vek as it doesnt work with tarpaulin +# tmp remove simd as it doesnt work with tarpaulin: https://github.com/rust-lang/rust/issues/77529 coverage: - extends: .recompile-branch + extends: .recompile stage: build script: - ln -s /dockercache/cache-tarpaulin target - find ./* -name "Cargo.toml" -exec sed -i 's/, "simd"]/]/g' {} \; - find ./* -name "Cargo.toml" -exec sed -i 's/"simd"]/]/g' {} \; - sed -i 's/vek /#vek /g' ./Cargo.toml; - - cargo tarpaulin -v --test-threads=2 + - cargo tarpaulin -v -- --test-threads=2 retry: max: 2 diff --git a/Cargo.lock b/Cargo.lock index 0e5c4f7cc7..fb8f8f1e2e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4012,19 +4012,19 @@ dependencies = [ "log", "memmap", "nix 0.18.0", - "wayland-client 0.28.0", - "wayland-cursor 0.28.0", - "wayland-protocols 0.28.0", + "wayland-client 0.28.1", + "wayland-cursor 0.28.1", + "wayland-protocols 0.28.1", ] [[package]] name = "smithay-clipboard" -version = "0.6.0" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c55200a03f4a52ed12ed66556992631e1aca6de22ad4347493c093325922f333" +checksum = "6e0eec3480d929e276b38424c8849575ee1e50003eae1cbdc93ee653147acc42" dependencies = [ "smithay-client-toolkit 0.12.0", - "wayland-client 0.28.0", + "wayland-client 0.28.1", ] [[package]] @@ -5184,18 +5184,18 @@ dependencies = [ [[package]] name = "wayland-client" -version = "0.28.0" +version = "0.28.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5147ab4114fa29cbfbd3718c933d8a4487035ff589e2650f29135fc2bc165646" +checksum = "80c54f9b90b2c044784f91fe22c5619a8a9c681db38492f2fd78ff968cf3f184" dependencies = [ "bitflags", "downcast-rs", "libc", "nix 0.18.0", "scoped-tls", - "wayland-commons 0.28.0", - "wayland-scanner 0.28.0", - "wayland-sys 0.28.0", + "wayland-commons 0.28.1", + "wayland-scanner 0.28.1", + "wayland-sys 0.28.1", ] [[package]] @@ -5212,14 +5212,14 @@ dependencies = [ [[package]] name = "wayland-commons" -version = "0.28.0" +version = "0.28.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01868f14a3f272e6cea0e0f573dd0e3a263552ae99dc5ef9016bd0fbf35f9c2d" +checksum = "7602d75560fe6f02cac723609cce658042fe60541b5107999818d29d4dab7cfa" dependencies = [ "nix 0.18.0", "once_cell", "smallvec 1.4.2", - "wayland-sys 0.28.0", + "wayland-sys 0.28.1", ] [[package]] @@ -5235,12 +5235,12 @@ dependencies = [ [[package]] name = "wayland-cursor" -version = "0.28.0" +version = "0.28.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1380ceb13377afd20b1ef0045334e6a58cc8f1a80cda285b482a21556924d38" +checksum = "0446b959c5b5b4b2c11f63112fc7cbeb50ecd9f2c340d2b0ea632875685baf04" dependencies = [ "nix 0.18.0", - "wayland-client 0.28.0", + "wayland-client 0.28.1", "xcursor", ] @@ -5268,14 +5268,14 @@ dependencies = [ [[package]] name = "wayland-protocols" -version = "0.28.0" +version = "0.28.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d5c56e9eea77f3808cfb3c9e676056542eea4a33a7b0b6075f9bc24fb15f779" +checksum = "0d419585bbdb150fb541579cff205c6095a86cd874530e41838d1f18a9569a08" dependencies = [ "bitflags", - "wayland-client 0.28.0", - "wayland-commons 0.28.0", - "wayland-scanner 0.28.0", + "wayland-client 0.28.1", + "wayland-commons 0.28.1", + "wayland-scanner 0.28.1", ] [[package]] @@ -5291,9 +5291,9 @@ dependencies = [ [[package]] name = "wayland-scanner" -version = "0.28.0" +version = "0.28.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "525547bf3c058b8736236037aa510a80b2a29b88145ff02a987cc27f8f92f83c" +checksum = "e1cc091af4b05a435312f7cefe3a26824d2017966a58362ca913f72c3d68e5e2" dependencies = [ "proc-macro2 1.0.23", "quote 1.0.7", @@ -5313,9 +5313,9 @@ dependencies = [ [[package]] name = "wayland-sys" -version = "0.28.0" +version = "0.28.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3dc1723584b6d204bbc3d15e361ee6a20d863ba8d4237842284eb3ff4f1b9a4" +checksum = "e5640f53d1fe6eaaa2e77b9ff015fe9a556173ce8388607f941aecfd9b05c73e" dependencies = [ "dlib", "lazy_static", diff --git a/common/src/cmd.rs b/common/src/cmd.rs index 8b5019550c..151efd7164 100644 --- a/common/src/cmd.rs +++ b/common/src/cmd.rs @@ -500,6 +500,7 @@ impl Display for ChatCommand { impl FromStr for ChatCommand { type Err = (); + #[allow(clippy::manual_strip)] fn from_str(keyword: &str) -> Result { let kwd = if keyword.starts_with('/') { &keyword[1..] diff --git a/common/src/vol.rs b/common/src/vol.rs index 7b0a49df8b..a9a82727b1 100644 --- a/common/src/vol.rs +++ b/common/src/vol.rs @@ -95,17 +95,17 @@ impl RectSizedVol for V { /// A volume that provides read access to its voxel data. pub trait ReadVol: BaseVol { /// Get a reference to the voxel at the provided position in the volume. - fn get<'a>(&'a self, pos: Vec3) -> Result<&'a Self::Vox, Self::Error>; + fn get(&self, pos: Vec3) -> Result<&Self::Vox, Self::Error>; #[allow(clippy::type_complexity)] // TODO: Pending review in #587 /// NOTE: By default, this ray will simply run from `from` to `to` without /// stopping. To make something interesting happen, call `until` or /// `for_each`. - fn ray<'a>( - &'a self, + fn ray( + &self, from: Vec3, to: Vec3, - ) -> Ray<'a, Self, fn(&Self::Vox) -> bool, fn(&Self::Vox, Vec3)> + ) -> Ray bool, fn(&Self::Vox, Vec3)> where Self: Sized, { @@ -295,5 +295,5 @@ impl<'a, T: ReadVol> Iterator for DefaultVolIterator<'a, T> { impl<'b, T: ReadVol> ReadVol for &'b T { #[inline(always)] - fn get<'a>(&'a self, pos: Vec3) -> Result<&'a Self::Vox, Self::Error> { (*self).get(pos) } + fn get(&self, pos: Vec3) -> Result<&'_ Self::Vox, Self::Error> { (*self).get(pos) } } diff --git a/server/src/chunk_generator.rs b/server/src/chunk_generator.rs index 324f20042c..35ab7e8032 100644 --- a/server/src/chunk_generator.rs +++ b/server/src/chunk_generator.rs @@ -73,7 +73,7 @@ impl ChunkGenerator { } } - pub fn pending_chunks<'a>(&'a self) -> impl Iterator> + 'a { + pub fn pending_chunks(&self) -> impl Iterator> + '_ { self.pending_chunks.keys().copied() } diff --git a/voxygen/src/scene/simple.rs b/voxygen/src/scene/simple.rs index 253b733b07..2e623aa767 100644 --- a/voxygen/src/scene/simple.rs +++ b/voxygen/src/scene/simple.rs @@ -33,7 +33,7 @@ impl BaseVol for VoidVol { type Vox = (); } impl ReadVol for VoidVol { - fn get<'a>(&'a self, _pos: Vec3) -> Result<&'a Self::Vox, Self::Error> { Ok(&()) } + fn get(&self, _pos: Vec3) -> Result<&'_ Self::Vox, Self::Error> { Ok(&()) } } fn generate_mesh<'a>( diff --git a/voxygen/src/window.rs b/voxygen/src/window.rs index 64f054bad5..1a1c868ce9 100644 --- a/voxygen/src/window.rs +++ b/voxygen/src/window.rs @@ -1253,23 +1253,18 @@ impl Window { pub fn set_fullscreen_mode(&mut self, fullscreen: FullScreenSettings) { let window = self.window.window(); self.fullscreen = fullscreen; - window.set_fullscreen( - fullscreen - .enabled - .then(|| match fullscreen.mode { - FullscreenMode::Exclusive => { - winit::window::Fullscreen::Exclusive(self.select_video_mode( - fullscreen.resolution, - fullscreen.bit_depth, - fullscreen.refresh_rate, - )) - }, - FullscreenMode::Borderless => { - winit::window::Fullscreen::Borderless(window.current_monitor()) - }, - }) - .or_else(|| None), - ); + window.set_fullscreen(fullscreen.enabled.then(|| match fullscreen.mode { + FullscreenMode::Exclusive => { + winit::window::Fullscreen::Exclusive(self.select_video_mode( + fullscreen.resolution, + fullscreen.bit_depth, + fullscreen.refresh_rate, + )) + }, + FullscreenMode::Borderless => { + winit::window::Fullscreen::Borderless(window.current_monitor()) + }, + })); } pub fn needs_refresh_resize(&mut self) { self.needs_refresh_resize = true; } diff --git a/world/src/sim/erosion.rs b/world/src/sim/erosion.rs index 3c16eb8a83..3c5e96e264 100644 --- a/world/src/sim/erosion.rs +++ b/world/src/sim/erosion.rs @@ -2289,11 +2289,11 @@ pub fn get_lakes( } /// Iterate through set neighbors of multi-receiver flow. -pub fn mrec_downhill<'a>( +pub fn mrec_downhill( map_size_lg: MapSizeLg, - mrec: &'a [u8], + mrec: &[u8], posi: usize, -) -> impl Clone + Iterator + 'a { +) -> impl Clone + Iterator { let pos = uniform_idx_as_vec2(map_size_lg, posi); let mrec_i = mrec[posi]; NEIGHBOR_DELTA diff --git a/world/src/sim/util.rs b/world/src/sim/util.rs index 26f85e7e34..763a63e09c 100644 --- a/world/src/sim/util.rs +++ b/world/src/sim/util.rs @@ -236,11 +236,11 @@ pub fn local_cells(map_size_lg: MapSizeLg, posi: usize) -> impl Clone + Iterator } // Note that we should already have okay cache locality since we have a grid. -pub fn uphill<'a>( +pub fn uphill( map_size_lg: MapSizeLg, - dh: &'a [isize], + dh: &[isize], posi: usize, -) -> impl Clone + Iterator + 'a { +) -> impl Clone + Iterator + '_ { neighbors(map_size_lg, posi).filter(move |&posj| dh[posj] == posi as isize) }