Skip to content

Commit

Permalink
update rust to 1.74.1 (#10)
Browse files Browse the repository at this point in the history
  • Loading branch information
TitanNano authored Dec 7, 2023
1 parent 56fd4c9 commit 77d1ebd
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 6 deletions.
2 changes: 1 addition & 1 deletion native/rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[toolchain]
channel = "1.72.0"
channel = "1.74.1"
components = [ "rustfmt", "clippy" ]
profile = "default"

5 changes: 1 addition & 4 deletions native/src/terrain_builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -222,10 +222,7 @@ impl TerrainBuilder {
let surface = vertex.surface();
let cell = VertexRef::from(vertex);

surfaces
.entry(surface)
.or_insert_with(Vec::new)
.push(Arc::clone(&cell));
surfaces.entry(surface).or_default().push(Arc::clone(&cell));

cell
}
Expand Down
2 changes: 1 addition & 1 deletion native/src/terrain_builder/ybuffer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ impl<V: 'static + DimensionX + DimensionZ + DimensionY + FixedPoint + SetDimensi
fn add(&mut self, value: V) {
let xz = (value.x().round() as usize, value.z().round() as usize);

self.entry(xz).or_insert_with(Vec::new).push(value);
self.entry(xz).or_default().push(value);
}

fn new() -> Self {
Expand Down

0 comments on commit 77d1ebd

Please sign in to comment.