Skip to content

Commit

Permalink
fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
mthom committed Feb 2, 2024
1 parent 7573c64 commit 75a94fd
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/machine/streams.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1875,7 +1875,7 @@ impl MachineState {
};

if path.extension().is_none() {
if let Some(metadata) = file.metadata().ok() {
if let Ok(metadata) = file.metadata() {
if metadata.is_dir() {
path.set_extension("pl");
continue;
Expand Down
2 changes: 1 addition & 1 deletion src/machine/system_calls.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5629,7 +5629,7 @@ impl Machine {

#[inline(always)]
pub(crate) fn inference_count(&mut self, count_var: HeapCellValue, count: Integer) {
if let Some(value) = <&Integer as TryInto<i64>>::try_into(&count).ok() {
if let Ok(value) = <&Integer as TryInto<i64>>::try_into(&count) {
self.machine_st
.unify_fixnum(Fixnum::build_with(value), count_var);
} else {
Expand Down
2 changes: 1 addition & 1 deletion src/rcu.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ thread_local! {
// odd value means the current thread is about to access the active_epoch of an Rcu
// a thread has a single epoch counter for all Rcu it accesses,
// as a thread can only access one Rcu at a time
static THREAD_EPOCH_COUNTER: OnceCell<Arc<AtomicU8>> = OnceCell::new();
static THREAD_EPOCH_COUNTER: OnceCell<Arc<AtomicU8>> = const { OnceCell::new() };
}

pub struct Rcu<T> {
Expand Down

0 comments on commit 75a94fd

Please sign in to comment.