Skip to content

Commit dfc0877

Browse files
committedAug 12, 2024
Fix future unreachable_patterns warnings.
These warnings currently on nightly will be unresolvable until Rust 1.82 is released, or <rust-lang/rust#129031> is fixed in some other way. After Rust 1.82, we can simply delete these match arms (and in fact replace the `match`es with `let`s, if we wish).
1 parent e106660 commit dfc0877

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed
 

Diff for: ‎all-is-cubes-desktop/src/glue/rerun_mesh.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@ use std::time::Instant;
44

55
use itertools::Itertools as _;
66

7-
use all_is_cubes_render::camera::Camera;
87
use all_is_cubes::euclid::{Point3D, Vector3D};
98
use all_is_cubes::math::{Cube, GridCoordinate};
109
use all_is_cubes::rerun_glue as rg;
1110
use all_is_cubes::space::Space;
1211
use all_is_cubes::time::DeadlineStd;
1312
use all_is_cubes::universe::Handle;
1413
use all_is_cubes_mesh as mesh;
14+
use all_is_cubes_render::camera::Camera;
1515

1616
use mesh::dynamic::ChunkedSpaceMesh;
1717
use mesh::texture::NoTexture;
@@ -49,6 +49,7 @@ impl From<mesh::BlockVertex<NoTexture>> for Vertex {
4949
position: v.position.to_f32().to_array().into(),
5050
color: match v.coloring {
5151
mesh::Coloring::Solid(color) => color.to_srgb8().into(),
52+
#[allow(unreachable_patterns)] // TODO: Remove this arm after Rust 1.81
5253
mesh::Coloring::Texture { .. } => unreachable!(),
5354
},
5455
}

Diff for: ‎all-is-cubes-ui/src/ui_content/pages.rs

+1
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ pub(super) fn new_paused_page(
5252
// TODO: quit_fn should be an async function, but we don't have a way to
5353
// kick off a “Quitting...” task yet.
5454
move || match quit_fn() {
55+
#[allow(unreachable_patterns)] // TODO: Remove this arm after Rust 1.81
5556
Ok(s) => match s {},
5657
Err(_cancelled) => {
5758

0 commit comments

Comments
 (0)
Please sign in to comment.