Skip to content

Commit

Permalink
chore: bump rust toolchain (#255)
Browse files Browse the repository at this point in the history
  • Loading branch information
MrCroxx authored Dec 27, 2023
1 parent de3ae0c commit dafcf8c
Show file tree
Hide file tree
Showing 7 changed files with 22 additions and 13 deletions.
4 changes: 2 additions & 2 deletions .github/template/template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ name:
on:

env:
RUST_TOOLCHAIN: nightly-2023-10-21
RUST_TOOLCHAIN: nightly-2023-12-26
CARGO_TERM_COLOR: always
CACHE_KEY_SUFFIX: 20231010v3
CACHE_KEY_SUFFIX: 20231227v1

jobs:
misc-check:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ on:
branches: [main]
workflow_dispatch:
env:
RUST_TOOLCHAIN: nightly-2023-10-21
RUST_TOOLCHAIN: nightly-2023-12-26
CARGO_TERM_COLOR: always
CACHE_KEY_SUFFIX: 20231010v3
CACHE_KEY_SUFFIX: 20231227v1
jobs:
misc-check:
name: misc check
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ on:
pull_request:
branches: [main]
env:
RUST_TOOLCHAIN: nightly-2023-10-21
RUST_TOOLCHAIN: nightly-2023-12-26
CARGO_TERM_COLOR: always
CACHE_KEY_SUFFIX: 20231010v3
CACHE_KEY_SUFFIX: 20231227v1
jobs:
misc-check:
name: misc check
Expand Down
1 change: 0 additions & 1 deletion foyer-intrusive/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
#![feature(trait_alias)]
#![feature(lint_reasons)]
#![expect(clippy::new_without_default)]
#![cfg_attr(test, expect(clippy::vtable_address_comparisons))]

pub use memoffset::offset_of;

Expand Down
8 changes: 6 additions & 2 deletions foyer-storage-bench/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -792,7 +792,9 @@ async fn write(
// TODO(MrCroxx): Use random content?
let entry_size = OsRng.gen_range(context.entry_size_range.clone());
let data = Arc::new(text(idx as usize, entry_size));
if let Some(limiter) = &mut limiter && let Some(wait) = limiter.consume(entry_size as f64) {
if let Some(limiter) = &mut limiter
&& let Some(wait) = limiter.consume(entry_size as f64)
{
tokio::time::sleep(wait).await;
}

Expand Down Expand Up @@ -889,7 +891,9 @@ async fn read(
.get_bytes
.fetch_add(entry_size, Ordering::Relaxed);

if let Some(limiter) = &mut limiter && let Some(wait) = limiter.consume(entry_size as f64) {
if let Some(limiter) = &mut limiter
&& let Some(wait) = limiter.consume(entry_size as f64)
{
tokio::time::sleep(wait).await;
}
} else {
Expand Down
12 changes: 9 additions & 3 deletions foyer-storage/src/catalog.rs
Original file line number Diff line number Diff line change
Expand Up @@ -134,8 +134,12 @@ where
item.inserted = Some(Instant::now());
guard.insert(key.clone(), item)
};
if let Some(old) = old && let Index::Inflight { .. } = old.index() {
self.metrics.inner_op_duration_entry_flush.observe(old.inserted.unwrap().elapsed().as_secs_f64());
if let Some(old) = old
&& let Index::Inflight { .. } = old.index()
{
self.metrics
.inner_op_duration_entry_flush
.observe(old.inserted.unwrap().elapsed().as_secs_f64());
}
}

Expand All @@ -147,7 +151,9 @@ where
pub fn remove(&self, key: &K) -> Option<Item<K, V>> {
let shard = self.shard(key);
let info: Option<Item<K, V>> = self.items[shard].write().remove(key);
if let Some(info) = &info && let Index::Region { view} = &info.index {
if let Some(info) = &info
&& let Index::Region { view } = &info.index
{
self.regions[*view.id() as usize].lock().remove(key);
}
info
Expand Down
2 changes: 1 addition & 1 deletion rust-toolchain
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
[toolchain]
channel = "nightly-2023-10-21"
channel = "nightly-2023-12-26"

0 comments on commit dafcf8c

Please sign in to comment.