Skip to content

Commit

Permalink
Use bitflags! consistently.
Browse files Browse the repository at this point in the history
This removes an `extern crate` and a `use` so that we always
call it via `bitflags::bitflags!` everywhere.
  • Loading branch information
waywardmonkeys committed Jul 12, 2024
1 parent 87ada34 commit 2bf42c6
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 8 deletions.
4 changes: 1 addition & 3 deletions src/geometry/interaction_groups.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)]
Expand Down
3 changes: 0 additions & 3 deletions src_testbed/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@

extern crate nalgebra as na;

#[macro_use]
extern crate bitflags;

#[cfg(feature = "log")]
#[macro_use]
extern crate log;
Expand Down
4 changes: 2 additions & 2 deletions src_testbed/testbed.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -91,7 +91,7 @@ bitflags! {
}
}

bitflags! {
bitflags::bitflags! {
#[derive(Copy, Clone, PartialEq, Eq, Debug)]
pub struct TestbedActionFlags: u32 {
const RESET_WORLD_GRAPHICS = 1 << 0;
Expand Down

0 comments on commit 2bf42c6

Please sign in to comment.