From 2bf42c6c96e7b5c20bc9e30464b410834234b4a0 Mon Sep 17 00:00:00 2001 From: Bruce Mitchener Date: Fri, 12 Jul 2024 14:59:31 +0700 Subject: [PATCH] Use `bitflags!` consistently. This removes an `extern crate` and a `use` so that we always call it via `bitflags::bitflags!` everywhere. --- src/geometry/interaction_groups.rs | 4 +--- src_testbed/lib.rs | 3 --- src_testbed/testbed.rs | 4 ++-- 3 files changed, 3 insertions(+), 8 deletions(-) diff --git a/src/geometry/interaction_groups.rs b/src/geometry/interaction_groups.rs index f61de1a45..10ba783d7 100644 --- a/src/geometry/interaction_groups.rs +++ b/src/geometry/interaction_groups.rs @@ -75,9 +75,7 @@ impl Default for InteractionGroups { } } -use bitflags::bitflags; - -bitflags! { +bitflags::bitflags! { /// A bit mask identifying groups for interaction. #[cfg_attr(feature = "serde-serialize", derive(Serialize, Deserialize))] #[derive(Copy, Clone, PartialEq, Eq, Debug, Hash)] diff --git a/src_testbed/lib.rs b/src_testbed/lib.rs index 2cb002ac3..24c7c8d03 100644 --- a/src_testbed/lib.rs +++ b/src_testbed/lib.rs @@ -3,9 +3,6 @@ extern crate nalgebra as na; -#[macro_use] -extern crate bitflags; - #[cfg(feature = "log")] #[macro_use] extern crate log; diff --git a/src_testbed/testbed.rs b/src_testbed/testbed.rs index a9d40fee9..5c0a804d2 100644 --- a/src_testbed/testbed.rs +++ b/src_testbed/testbed.rs @@ -74,7 +74,7 @@ fn usage(exe_name: &str) { info!(" --pause - do not start the simulation right away."); } -bitflags! { +bitflags::bitflags! { #[derive(Copy, Clone, PartialEq, Eq, Debug, Default)] pub struct TestbedStateFlags: u32 { const NONE = 0; @@ -91,7 +91,7 @@ bitflags! { } } -bitflags! { +bitflags::bitflags! { #[derive(Copy, Clone, PartialEq, Eq, Debug)] pub struct TestbedActionFlags: u32 { const RESET_WORLD_GRAPHICS = 1 << 0;