1
0
Fork 0
mirror of https://github.com/jugeeya/UltimateTrainingModpack.git synced 2024-11-28 04:44:06 +00:00

Consts formatting

This commit is contained in:
jugeeya 2023-08-08 10:42:37 -07:00 committed by GitHub
parent 7a7e7bdc52
commit f999b4669c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1447,22 +1447,22 @@ impl ToggleTrait for RecordingFrames {
Debug, Clone, Copy, PartialEq, FromPrimitive, EnumIter, Serialize_repr, Deserialize_repr,
)]
pub enum ButtonConfig {
A = 0b0000_0000_0000_0000_0001,
B = 0b0000_0000_0000_0000_0010,
X = 0b0000_0000_0000_0000_0100,
Y = 0b0000_0000_0000_0000_1000,
L = 0b0000_0000_0000_0001_0000,
R = 0b0000_0000_0000_0010_0000,
ZL = 0b0000_0000_0000_0100_0000,
ZR = 0b0000_0000_0000_1000_0000,
DpadUp = 0b0000_0000_0001_0000_0000,
DpadDown = 0b0000_0000_0010_0000_0000,
DpadLeft = 0b0000_0000_0100_0000_0000,
DpadRight = 0b0000_0000_1000_0000_0000,
Plus = 0b0000_0001_0000_0000_0000,
Minus = 0b0000_0010_0000_0000_0000,
LStick = 0b0000_0100_0000_0000_0000,
RStick = 0b0000_1000_0000_0000_0000,
A = 0b0000_0000_0000_0000_0001,
B = 0b0000_0000_0000_0000_0010,
X = 0b0000_0000_0000_0000_0100,
Y = 0b0000_0000_0000_0000_1000,
L = 0b0000_0000_0000_0001_0000,
R = 0b0000_0000_0000_0010_0000,
ZL = 0b0000_0000_0000_0100_0000,
ZR = 0b0000_0000_0000_1000_0000,
DpadUp = 0b0000_0000_0001_0000_0000,
DpadDown = 0b0000_0000_0010_0000_0000,
DpadLeft = 0b0000_0000_0100_0000_0000,
DpadRight = 0b0000_0000_1000_0000_0000,
Plus = 0b0000_0001_0000_0000_0000,
Minus = 0b0000_0010_0000_0000_0000,
LStick = 0b0000_0100_0000_0000_0000,
RStick = 0b0000_1000_0000_0000_0000,
}
impl ButtonConfig {
@ -1491,12 +1491,10 @@ impl ButtonConfig {
impl ToggleTrait for ButtonConfig {
fn to_toggle_strs() -> Vec<&'static str> {
ButtonConfig::iter()
.map(|i| i.as_str())
.collect()
ButtonConfig::iter().map(|i| i.as_str()).collect()
}
fn to_toggle_vals() -> Vec<u32> {
ButtonConfig::iter().map(|i| i as u32).collect()
}
}
}