Skip to content

Commit

Permalink
clippy daddio
Browse files Browse the repository at this point in the history
  • Loading branch information
jupyterkat committed Nov 9, 2024
1 parent 1529f18 commit db13693
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 13 deletions.
2 changes: 1 addition & 1 deletion crates/auxmacros/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ fn strip_mut_and_filter(arg: &syn::FnArg) -> Option<syn::FnArg> {
///#[auxmacros::generate_simd_functions]
///#[byondapi::bind("/proc/process_atmos_callbacks")]
///fn atmos_callback_handle(remaining: ByondValue) -> Result<ByondValue> {
/// auxcallback::callback_processing_hook(remaining)
/// auxcallback::callback_processing_hook(remaining)
///}
/// ```
#[proc_macro_attribute]
Expand Down
6 changes: 3 additions & 3 deletions src/gas/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ static GAS_SPECIFIC_HEATS: RwLock<Option<Vec<f32>>> = const_rwlock(None);

#[byondapi::init]
pub fn initialize_gas_info_structs() {
*GAS_INFO_BY_STRING.write() = Some(DashMap::with_hasher(FxBuildHasher::default()));
*GAS_INFO_BY_STRING.write() = Some(DashMap::with_hasher(FxBuildHasher));
*GAS_INFO_BY_IDX.write() = Some(Vec::new());
*GAS_SPECIFIC_HEATS.write() = Some(Vec::new());
}
Expand Down Expand Up @@ -429,8 +429,8 @@ fn finalize_gas_refs() -> Result<ByondValue> {
}

thread_local! {
static CACHED_GAS_IDS: RefCell<HashMap<u32, GasIDX, FxBuildHasher>> = RefCell::new(HashMap::with_hasher(FxBuildHasher::default()));
static CACHED_IDX_TO_STRINGS: RefCell<HashMap<usize,Box<str>, FxBuildHasher>> = RefCell::new(HashMap::with_hasher(FxBuildHasher::default()));
static CACHED_GAS_IDS: RefCell<HashMap<u32, GasIDX, FxBuildHasher>> = const { RefCell::new(HashMap::with_hasher(FxBuildHasher)) };
static CACHED_IDX_TO_STRINGS: RefCell<HashMap<usize,Box<str>, FxBuildHasher>> = const { RefCell::new(HashMap::with_hasher(FxBuildHasher)) };
}

/// Returns the appropriate index to be used by auxmos for a given ID string.
Expand Down
2 changes: 1 addition & 1 deletion src/reaction.rs
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ impl Reaction {
let id = {
let mut state = rustc_hash::FxHasher::default();
string_id.as_bytes().hash(&mut state);
state.finish() as u64
state.finish()
};

let our_reaction = {
Expand Down
2 changes: 1 addition & 1 deletion src/turfs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,7 @@ pub fn initialize_turfs() {
// double that for edges since each turf can have up to 6 edges but eehhhh
*TURF_GASES.write() = Some(TurfGases {
graph: StableDiGraph::with_capacity(650_250, 1_300_500),
map: IndexMap::with_capacity_and_hasher(650_250, FxBuildHasher::default()),
map: IndexMap::with_capacity_and_hasher(650_250, FxBuildHasher),
});
*PLANETARY_ATMOS.write() = Some(Default::default());
}
Expand Down
13 changes: 6 additions & 7 deletions src/turfs/katmos.rs
Original file line number Diff line number Diff line change
Expand Up @@ -712,13 +712,12 @@ fn send_pressure_differences(
drop(sender.try_send(Box::new(move || {
let turf = ByondValue::new_ref(ValueType::Turf, cur_turf);
let other_turf = ByondValue::new_ref(ValueType::Turf, adj_turf);
Ok(turf
.call_id(
byond_string!("consider_pressure_difference"),
&[other_turf, amt.into()],
)
.map(|_| ())
.wrap_err("Katmos considering pressure differences")?)
turf.call_id(
byond_string!("consider_pressure_difference"),
&[other_turf, amt.into()],
)
.map(|_| ())
.wrap_err("Katmos considering pressure differences")
})));
}
}
Expand Down

0 comments on commit db13693

Please sign in to comment.