Skip to content

Commit

Permalink
rustfmt
Browse files Browse the repository at this point in the history
  • Loading branch information
LemonInTheDark committed Jul 8, 2024
1 parent 5ddfbd8 commit 11230d4
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 9 deletions.
11 changes: 8 additions & 3 deletions hypnagogic_core/src/operations/cutters/bitmask_dir_visibility.rs
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,12 @@ impl IconOperationConfig for BitmaskDirectionalVis {
.animation
.clone()
.map(|x| repeat_for(&x.delays, num_frames as usize));
let rewind = self.bitmask_slice_config.animation.as_ref().and_then(|animation| animation.rewind).unwrap_or(false);
let rewind = self
.bitmask_slice_config
.animation
.as_ref()
.and_then(|animation| animation.rewind)
.unwrap_or(false);

let mut icon_states = vec![];

Expand Down Expand Up @@ -112,7 +117,7 @@ impl IconOperationConfig for BitmaskDirectionalVis {
frames: num_frames,
images: icon_state_frames,
delay: delay.clone(),
rewind: rewind,
rewind,
..Default::default()
}));
}
Expand Down Expand Up @@ -155,7 +160,7 @@ impl IconOperationConfig for BitmaskDirectionalVis {
frames: num_frames,
images: icon_state_frames,
delay: delay.clone(),
rewind: rewind,
rewind,

..Default::default()
}));
Expand Down
8 changes: 6 additions & 2 deletions hypnagogic_core/src/operations/cutters/bitmask_slice.rs
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,11 @@ impl IconOperationConfig for BitmaskSlice {
.animation
.clone()
.map(|x| repeat_for(&x.delays, num_frames as usize));
let rewind = self.animation.as_ref().and_then(|animation| animation.rewind).unwrap_or(false);
let rewind = self
.animation
.as_ref()
.and_then(|animation| animation.rewind)
.unwrap_or(false);

let states_to_gen = (0..possible_states)
.map(|x| Adjacency::from_bits(x as u8).unwrap())
Expand All @@ -139,7 +143,7 @@ impl IconOperationConfig for BitmaskSlice {
frames: num_frames,
images: icon_state_frames,
delay: delay.clone(),
rewind: rewind,
rewind,
..Default::default()
}));
}
Expand Down
10 changes: 7 additions & 3 deletions hypnagogic_core/src/operations/cutters/bitmask_windows.rs
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,11 @@ impl IconOperationConfig for BitmaskWindows {
.animation
.clone()
.map(|x| repeat_for(&x.delays, num_frames as usize));
let rewind = self.animation.as_ref().and_then(|animation| animation.rewind).unwrap_or(false);
let rewind = self
.animation
.as_ref()
.and_then(|animation| animation.rewind)
.unwrap_or(false);

let mut states = vec![];

Expand Down Expand Up @@ -133,7 +137,7 @@ impl IconOperationConfig for BitmaskWindows {
frames: num_frames,
images: upper_frames,
delay: delay.clone(),
rewind: rewind,
rewind,
..Default::default()
}));
states.push(dedupe_frames(IconState {
Expand All @@ -142,7 +146,7 @@ impl IconOperationConfig for BitmaskWindows {
frames: num_frames,
images: lower_frames,
delay: delay.clone(),
rewind: rewind,
rewind,
..Default::default()
}));
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,10 @@ impl IconOperationConfig for BitmaskSliceReconstruct {
let delays: Option<Vec<f32>> = trimmed_frames
.first()
.and_then(|first_frame| first_frame.delay.clone());
let rewind = trimmed_frames.first().and_then(|first_frame| Some(first_frame.rewind)).unwrap_or(false);
let rewind = trimmed_frames
.first()
.and_then(|first_frame| Some(first_frame.rewind))
.unwrap_or(false);

let mut problem_states: Vec<InconsistentDelay> = vec![];
for (x, state) in trimmed_frames.into_iter().enumerate() {
Expand Down

0 comments on commit 11230d4

Please sign in to comment.