Skip to content

Commit

Permalink
style: address pedantic lints for variable names and syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
austinhartzheim committed Dec 25, 2024
1 parent 4ff3d79 commit 09ff792
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
4 changes: 2 additions & 2 deletions src/guard.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,9 @@ pub struct ReadResult<'a, T: Archive> {

impl<'a, T: Archive> ReadResult<'a, T> {
/// Creates new `ReadResult` with specified parameters
pub(crate) fn new(_guard: ReadGuard<'a>, entity: &'a Archived<T>, switched: bool) -> Self {
pub(crate) fn new(guard: ReadGuard<'a>, entity: &'a Archived<T>, switched: bool) -> Self {
ReadResult {
_guard,
_guard: guard,
entity,
switched,
}
Expand Down
9 changes: 4 additions & 5 deletions src/state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,8 @@ impl State {
num_readers.store(0, Ordering::SeqCst);
reset = true;
break;
} else {
thread::sleep(sleep_duration);
}
thread::sleep(sleep_duration);
}

(next_idx, reset)
Expand Down Expand Up @@ -175,9 +174,9 @@ impl<'a, WL: WriteLockStrategy<'a>> StateContainer<WL> {
let new_state = State::default();
unsafe {
mmap.as_mut_ptr()
.copy_from((&new_state as *const State) as *const u8, STATE_SIZE)
};
};
.copy_from((&new_state as *const State) as *const u8, STATE_SIZE);
}
}

self.mmap = Some(WL::new(mmap, state_file));
Ok(())
Expand Down

0 comments on commit 09ff792

Please sign in to comment.