Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: bump rust toolchain #255

Merged
merged 2 commits into from
Dec 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@
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 @@
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
{

Check warning on line 156 in foyer-storage/src/catalog.rs

View check run for this annotation

Codecov / codecov/patch

foyer-storage/src/catalog.rs#L156

Added line #L156 was not covered by tests
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"
Loading