Skip to content

Commit

Permalink
fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
trxcllnt committed Dec 28, 2024
1 parent 3fa9296 commit 9f807df
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 13 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ jobs:
# Oldest supported version, keep in sync with README.md
rustc: "1.75.0"
extra_desc: dist-server
extra_args: --no-default-features --features="redis,s3,memcached,gcs,azure,gha,webdav,oss,dist-tests" test_dist_ -- --test-threads 1
extra_args: --no-default-features --features="dist-tests" test_dist_ -- --test-threads 1
- os: ubuntu-20.04
rustc: stable
- os: ubuntu-20.04
Expand Down
13 changes: 7 additions & 6 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -182,10 +182,8 @@ features = [
version = "0.52"

[features]
all = [
"cloud-storage",
"dist-client",
]
all = ["cloud-storage", "dist-client"]
azure = ["opendal/services-azblob", "reqsign", "reqwest"]
cloud-storage = [
"redis",
"s3",
Expand All @@ -196,7 +194,6 @@ cloud-storage = [
"webdav",
"oss",
]
azure = ["opendal/services-azblob", "reqsign", "reqwest"]
default = ["all"]
gcs = ["opendal/services-gcs", "reqsign", "url", "reqwest"]
gha = ["opendal/services-ghac", "reqwest"]
Expand All @@ -209,7 +206,11 @@ webdav = ["opendal/services-webdav", "reqwest"]
# Enable features that will build a vendored version of openssl and
# statically linked with it, instead of linking against the system-wide openssl
# dynamically or statically.
vendored-openssl = ["openssl?/vendored", "reqwest?/native-tls-vendored", "tokio-tungstenite?/native-tls-vendored"]
vendored-openssl = [
"openssl?/vendored",
"reqwest?/native-tls-vendored",
"tokio-tungstenite?/native-tls-vendored",
]
# Enable features that require unstable features of Nightly Rust.
unstable = []
# Enables distributed support in the sccache client
Expand Down
10 changes: 4 additions & 6 deletions src/dist/cache.rs
Original file line number Diff line number Diff line change
Expand Up @@ -544,6 +544,7 @@ mod server {
use tokio::io::BufReader;
use tokio_util::compat::{FuturesAsyncReadCompatExt, TokioAsyncReadCompatExt};

use std::collections::hash_map::RandomState;
use std::path::{Path, PathBuf};
use std::sync::Arc;

Expand All @@ -556,7 +557,7 @@ mod server {
use super::make_lru_key_path;

fn cached_toolchains_size(
toolchains: &LruCache<Toolchain, (PathBuf, u64), std::hash::RandomState, ToolchainSize>,
toolchains: &LruCache<Toolchain, (PathBuf, u64), RandomState, ToolchainSize>,
) -> u64 {
toolchains.iter().map(|(_, (_, size))| size).sum()
}
Expand Down Expand Up @@ -598,9 +599,7 @@ mod server {
root_dir: PathBuf,
tc_sizes: Arc<ResourceLoaderQueue<Toolchain, u64>>,
tc_storage: Arc<dyn cache::Storage>,
toolchains: Arc<
Mutex<LruCache<Toolchain, (PathBuf, u64), std::hash::RandomState, ToolchainSize>>,
>,
toolchains: Arc<Mutex<LruCache<Toolchain, (PathBuf, u64), RandomState, ToolchainSize>>>,
) -> Result<()> {
let toolchain_id = &tc.archive_id;
let inflated_size = tc_sizes.enqueue(&tc).await?;
Expand Down Expand Up @@ -657,8 +656,7 @@ mod server {
}

pub struct ServerToolchains {
toolchains:
Arc<Mutex<LruCache<Toolchain, (PathBuf, u64), std::hash::RandomState, ToolchainSize>>>,
toolchains: Arc<Mutex<LruCache<Toolchain, (PathBuf, u64), RandomState, ToolchainSize>>>,
toolchains_loader: ResourceLoaderQueue<Toolchain, ()>,
}

Expand Down

0 comments on commit 9f807df

Please sign in to comment.