Skip to content

Commit cb59539

Browse files
committed
Fix clippy::new_without_default lint (new occurrence in Rust 1.71).
1 parent 0463071 commit cb59539

File tree

1 file changed

+13
-5
lines changed

1 file changed

+13
-5
lines changed

all-is-cubes-mesh/src/chunked_mesh/blocks.rs

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,7 @@ pub(crate) struct VersionedBlockMeshes<Vert, Tile> {
1717
last_version_counter: NonZeroU32,
1818
}
1919

20-
impl<Vert, Tile> VersionedBlockMeshes<Vert, Tile>
21-
where
22-
Vert: GfxVertex<TexPoint = <Tile as TextureTile>::Point> + PartialEq,
23-
Tile: TextureTile + PartialEq,
24-
{
20+
impl<Vert, Tile> VersionedBlockMeshes<Vert, Tile> {
2521
pub fn new() -> Self {
2622
Self {
2723
meshes: Vec::new(),
@@ -35,7 +31,13 @@ where
3531
pub fn clear(&mut self) {
3632
self.meshes.clear();
3733
}
34+
}
3835

36+
impl<Vert, Tile> VersionedBlockMeshes<Vert, Tile>
37+
where
38+
Vert: GfxVertex<TexPoint = <Tile as TextureTile>::Point> + PartialEq,
39+
Tile: TextureTile + PartialEq,
40+
{
3941
/// Update block meshes based on the given [`Space`].
4042
///
4143
/// After this method returns, `self.meshes.len()` will
@@ -181,6 +183,12 @@ where
181183
}
182184
}
183185

186+
impl<Vert, Tile> Default for VersionedBlockMeshes<Vert, Tile> {
187+
fn default() -> Self {
188+
Self::new()
189+
}
190+
}
191+
184192
impl<'a, Vert: 'static, Tile: 'static> GetBlockMesh<'a, Vert, Tile>
185193
for &'a VersionedBlockMeshes<Vert, Tile>
186194
{

0 commit comments

Comments
 (0)