Skip to content

Commit

Permalink
Rust 1.84(?): Remove clippy::module_name_repetitions false positive…
Browse files Browse the repository at this point in the history
… `expect`s.
  • Loading branch information
kpreid committed Oct 22, 2024
1 parent e51c003 commit 9ec9dc1
Show file tree
Hide file tree
Showing 50 changed files with 2 additions and 236 deletions.
5 changes: 0 additions & 5 deletions all-is-cubes-base/src/math/coord.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
//! Numeric types used for coordinates and related quantities.

#![expect(
clippy::module_name_repetitions,
reason = "module is private; https://github.com/rust-lang/rust-clippy/issues/8524"
)]

use euclid::{Box3D, Point3D, Size2D, Size3D, Vector3D};

use crate::math::Cube;
Expand Down
5 changes: 0 additions & 5 deletions all-is-cubes-base/src/math/face.rs
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
//! Axis-aligned unit vectors: the [`Face6`] and [`Face7`] types.
//! This module is private but reexported by its parent.

#![expect(
clippy::module_name_repetitions,
reason = "module is private; https://github.com/rust-lang/rust-clippy/issues/8524"
)]

use core::fmt;
use core::ops;

Expand Down
5 changes: 0 additions & 5 deletions all-is-cubes-base/src/math/matrix.rs
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
//! Integer-coordinate matrices.
//! This module is private but reexported by its parent.

#![expect(
clippy::module_name_repetitions,
reason = "module is private; https://github.com/rust-lang/rust-clippy/issues/8524"
)]

use core::cmp::Ordering;
use core::ops;

Expand Down
5 changes: 0 additions & 5 deletions all-is-cubes-base/src/math/octant.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
#![expect(
clippy::module_name_repetitions,
reason = "module is private; https://github.com/rust-lang/rust-clippy/issues/8524"
)]

use core::{fmt, ops};

use euclid::{vec3, Vector3D};
Expand Down
5 changes: 0 additions & 5 deletions all-is-cubes-base/src/math/rotation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,6 @@
clippy::large_stack_arrays,
reason = "effectively-false positive on Arbitrary derive"
)]
#![expect(
clippy::module_name_repetitions,
reason = "module is private; https://github.com/rust-lang/rust-clippy/issues/8524"
)]

use core::marker::PhantomData;
use core::ops::Mul;

Expand Down
5 changes: 0 additions & 5 deletions all-is-cubes-base/src/math/vol.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
#![expect(
clippy::module_name_repetitions,
reason = "module is private; https://github.com/rust-lang/rust-clippy/issues/8524"
)]

use alloc::boxed::Box;
use alloc::sync::Arc;
use core::fmt;
Expand Down
5 changes: 0 additions & 5 deletions all-is-cubes-base/src/raycast/axis_aligned.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
#![expect(
clippy::module_name_repetitions,
reason = "module is private; https://github.com/rust-lang/rust-clippy/issues/8524"
)]

use crate::math::{self, Cube, Face7, FreeCoordinate, GridAab};

use super::{AaRay, RaycastStep};
Expand Down
5 changes: 0 additions & 5 deletions all-is-cubes-content/src/blocks.rs
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
//! Block definitions that are specific to the demo/initial content and not fundamental
//! or UI.

#![expect(
clippy::module_name_repetitions,
reason = "module is private; https://github.com/rust-lang/rust-clippy/issues/8524"
)]

use alloc::sync::Arc;
use core::fmt;
use core::num::NonZeroU16;
Expand Down
5 changes: 0 additions & 5 deletions all-is-cubes-content/src/dungeon/maze.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
#![expect(
clippy::module_name_repetitions,
reason = "module is private; https://github.com/rust-lang/rust-clippy/issues/8524"
)]

use alloc::boxed::Box;
use alloc::collections::VecDeque;

Expand Down
5 changes: 0 additions & 5 deletions all-is-cubes-content/src/landscape.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
#![expect(
clippy::module_name_repetitions,
reason = "module is private; https://github.com/rust-lang/rust-clippy/issues/8524"
)]

use alloc::boxed::Box;
use core::array;
use core::fmt;
Expand Down
5 changes: 0 additions & 5 deletions all-is-cubes-content/src/template.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
//! First-run game content.

#![expect(
clippy::module_name_repetitions,
reason = "module is private; https://github.com/rust-lang/rust-clippy/issues/8524"
)]

use alloc::boxed::Box;
use alloc::string::{String, ToString as _};
use alloc::sync::Arc;
Expand Down
1 change: 0 additions & 1 deletion all-is-cubes-content/src/tree.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ use crate::LandscapeBlocks::{self, Leaves, Log};
unnameable_types,
reason = "TODO: this should be public with an opaque struct wrapper"
)]
#[expect(clippy::module_name_repetitions)] // TODO: rename to Growth?
pub enum TreeGrowth {
Sapling = 1, // radius = 1
G2, // radius = 2
Expand Down
1 change: 0 additions & 1 deletion all-is-cubes-desktop/src/glue/winit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,6 @@ pub fn map_key(key: winit::keyboard::PhysicalKey) -> Option<all_is_cubes_ui::app
})
}

#[expect(clippy::module_name_repetitions)]
pub fn cursor_icon_to_winit(icon: &all_is_cubes_ui::apps::CursorIcon) -> winit::window::CursorIcon {
use all_is_cubes_ui::apps::CursorIcon as A;
use winit::window::CursorIcon as W;
Expand Down
5 changes: 0 additions & 5 deletions all-is-cubes-desktop/src/record/options.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
//! Options controlling recording.

#![expect(
clippy::module_name_repetitions,
reason = "module is private; https://github.com/rust-lang/rust-clippy/issues/8524"
)]

use std::ops::RangeInclusive;
use std::path::PathBuf;
use std::time::Duration;
Expand Down
5 changes: 0 additions & 5 deletions all-is-cubes-desktop/src/session.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
#![expect(
clippy::module_name_repetitions,
reason = "module is private; https://github.com/rust-lang/rust-clippy/issues/8524"
)]

use std::path::PathBuf;
use std::sync::Arc;
use std::time::{Duration, Instant};
Expand Down
5 changes: 0 additions & 5 deletions all-is-cubes-desktop/src/terminal/options.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
#![expect(
clippy::module_name_repetitions,
reason = "module is private; https://github.com/rust-lang/rust-clippy/issues/8524"
)]

use std::ops;

use ratatui::crossterm::style::Color;
Expand Down
5 changes: 0 additions & 5 deletions all-is-cubes-gpu/src/common/info.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
#![expect(
clippy::module_name_repetitions,
reason = "module is private; https://github.com/rust-lang/rust-clippy/issues/8524"
)]

use std::time::Duration;
use std::{fmt, ops};

Expand Down
5 changes: 0 additions & 5 deletions all-is-cubes-mesh/src/dynamic/chunk.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
#![expect(
clippy::module_name_repetitions,
reason = "module is private; https://github.com/rust-lang/rust-clippy/issues/8524"
)]

use all_is_cubes::euclid::Translation3D;
use alloc::sync::Arc;
use alloc::vec::Vec;
Expand Down
5 changes: 0 additions & 5 deletions all-is-cubes-mesh/src/dynamic/instance.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
#![expect(
clippy::module_name_repetitions,
reason = "module is private; https://github.com/rust-lang/rust-clippy/issues/8524"
)]

use alloc::vec::Vec;
use core::fmt;

Expand Down
5 changes: 0 additions & 5 deletions all-is-cubes-mesh/src/dynamic/render_data.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
#![expect(
clippy::module_name_repetitions,
reason = "module is private; https://github.com/rust-lang/rust-clippy/issues/8524"
)]

use core::fmt;

use all_is_cubes::euclid::Vector3D;
Expand Down
5 changes: 0 additions & 5 deletions all-is-cubes-port/src/export.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
#![expect(
clippy::module_name_repetitions,
reason = "module is private; https://github.com/rust-lang/rust-clippy/issues/8524"
)]

#[allow(unused_imports)]
use std::path::{Path, PathBuf};
#[allow(unused_imports)]
Expand Down
5 changes: 0 additions & 5 deletions all-is-cubes-port/src/import.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
#![expect(
clippy::module_name_repetitions,
reason = "module is private; https://github.com/rust-lang/rust-clippy/issues/8524"
)]

use std::io;
use std::sync::Arc;

Expand Down
5 changes: 0 additions & 5 deletions all-is-cubes-render/src/headless.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
#![expect(
clippy::module_name_repetitions,
reason = "module is private; https://github.com/rust-lang/rust-clippy/issues/8524"
)]

use alloc::vec::Vec;

use embedded_graphics::mono_font::iso_8859_1::FONT_7X13_BOLD;
Expand Down
5 changes: 0 additions & 5 deletions all-is-cubes-render/src/raytracer/renderer.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
#![expect(
clippy::module_name_repetitions,
reason = "module is private; https://github.com/rust-lang/rust-clippy/issues/8524"
)]

use alloc::boxed::Box;
use alloc::string::String;
use alloc::sync::Arc;
Expand Down
5 changes: 0 additions & 5 deletions all-is-cubes-ui/src/apps/input.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
#![expect(
clippy::module_name_repetitions,
reason = "module is private; https://github.com/rust-lang/rust-clippy/issues/8524"
)]

use alloc::vec::Vec;
use core::time::Duration;
use std::collections::{HashMap, HashSet};
Expand Down
5 changes: 0 additions & 5 deletions all-is-cubes-ui/src/apps/session.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
#![expect(
clippy::module_name_repetitions,
reason = "module is private; https://github.com/rust-lang/rust-clippy/issues/8524"
)]

use alloc::boxed::Box;
use alloc::string::ToString as _;
use alloc::sync::{Arc, Weak};
Expand Down
2 changes: 1 addition & 1 deletion all-is-cubes-ui/src/vui/blocks.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#![expect(
clippy::module_name_repetitions,
reason = "module is private; https://github.com/rust-lang/rust-clippy/issues/8524"
reason = "module is private; TODO: file new bug"
)]

use core::fmt;
Expand Down
5 changes: 0 additions & 5 deletions all-is-cubes-ui/src/vui/layout.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
#![expect(
clippy::module_name_repetitions,
reason = "module is private; https://github.com/rust-lang/rust-clippy/issues/8524"
)]

use alloc::boxed::Box;
use alloc::rc::Rc;
use alloc::sync::Arc;
Expand Down
5 changes: 0 additions & 5 deletions all-is-cubes-ui/src/vui/widgets/button.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
#![expect(
clippy::module_name_repetitions,
reason = "module is private; https://github.com/rust-lang/rust-clippy/issues/8524"
)]

use alloc::borrow::ToOwned as _;
use alloc::boxed::Box;
use alloc::format;
Expand Down
5 changes: 0 additions & 5 deletions all-is-cubes-ui/src/vui/widgets/progress_bar.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
#![expect(
clippy::module_name_repetitions,
reason = "module is private; https://github.com/rust-lang/rust-clippy/issues/8524"
)]

use alloc::boxed::Box;
use alloc::sync::Arc;

Expand Down
5 changes: 0 additions & 5 deletions all-is-cubes-ui/src/vui/widgets/text.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
#![expect(
clippy::module_name_repetitions,
reason = "module is private; https://github.com/rust-lang/rust-clippy/issues/8524"
)]

use alloc::boxed::Box;
use alloc::sync::Arc;

Expand Down
5 changes: 0 additions & 5 deletions all-is-cubes-ui/src/vui/widgets/theme.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
#![expect(
clippy::module_name_repetitions,
reason = "module is private; https://github.com/rust-lang/rust-clippy/issues/8524"
)]

use alloc::format;
use alloc::sync::Arc;
use core::fmt;
Expand Down
5 changes: 0 additions & 5 deletions all-is-cubes/src/block/attributes.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
//! [`BlockAttributes`] and closely related types.

#![expect(
clippy::module_name_repetitions,
reason = "module is private; https://github.com/rust-lang/rust-clippy/issues/8524"
)]

use core::{fmt, ops};

use arcstr::ArcStr;
Expand Down
5 changes: 0 additions & 5 deletions all-is-cubes/src/block/block_def.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
#![expect(
clippy::module_name_repetitions,
reason = "module is private; https://github.com/rust-lang/rust-clippy/issues/8524"
)]

use alloc::sync::Arc;
use core::{fmt, mem, ops};

Expand Down
5 changes: 0 additions & 5 deletions all-is-cubes/src/block/eval/evaluated.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
//! [`EvaluatedBlock`] and [`Evoxel`].

#![expect(
clippy::module_name_repetitions,
reason = "module is private; https://github.com/rust-lang/rust-clippy/issues/8524"
)]

use alloc::boxed::Box;
use core::{fmt, ptr};

Expand Down
5 changes: 0 additions & 5 deletions all-is-cubes/src/block/eval/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,6 @@
//! it does not contain the elements that are evaluated
//! ([`crate::block::Primitive`] and [`crate::block::Modifier`])

#![expect(
clippy::module_name_repetitions,
reason = "module is private; https://github.com/rust-lang/rust-clippy/issues/8524"
)]

mod control;
#[cfg(test)]
pub(crate) use control::ErrorKind;
Expand Down
5 changes: 0 additions & 5 deletions all-is-cubes/src/block/modifier/composite.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
#![expect(
clippy::module_name_repetitions,
reason = "module is private; https://github.com/rust-lang/rust-clippy/issues/8524"
)]

use alloc::vec;
use core::mem;

Expand Down
5 changes: 0 additions & 5 deletions all-is-cubes/src/character/cursor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,6 @@
//!
//! TODO: It's unclear what the scope of this module should be.

#![expect(
clippy::module_name_repetitions,
reason = "module is private; https://github.com/rust-lang/rust-clippy/issues/8524"
)]

use core::fmt;

use euclid::point3;
Expand Down
5 changes: 0 additions & 5 deletions all-is-cubes/src/inv/inventory.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
//! [`Inventory`] for storing items.

#![expect(
clippy::module_name_repetitions,
reason = "module is private; https://github.com/rust-lang/rust-clippy/issues/8524"
)]

use alloc::borrow::Cow;
use alloc::boxed::Box;
use alloc::collections::BTreeMap;
Expand Down
5 changes: 0 additions & 5 deletions all-is-cubes/src/inv/tool.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
//! [`Tool`] and related.

#![expect(
clippy::module_name_repetitions,
reason = "module is private; https://github.com/rust-lang/rust-clippy/issues/8524"
)]

use alloc::borrow::Cow;
use alloc::string::{String, ToString};
use alloc::sync::Arc;
Expand Down
5 changes: 0 additions & 5 deletions all-is-cubes/src/listen/cell.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
#![expect(
clippy::module_name_repetitions,
reason = "module is private; https://github.com/rust-lang/rust-clippy/issues/8524"
)]

use core::fmt;

use alloc::sync::Arc;
Expand Down
Loading

0 comments on commit 9ec9dc1

Please sign in to comment.