Skip to content

Commit

Permalink
Merge pull request #2553 from subspace/switch-from-fs2-to-fs4
Browse files Browse the repository at this point in the history
Replace unmaintained `fs2` with `fs4`
  • Loading branch information
nazar-pc authored Feb 26, 2024
2 parents 4c8b66d + ff3e802 commit 492586f
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 11 deletions.
18 changes: 14 additions & 4 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion crates/subspace-farmer-components/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ async-lock = "3.3.0"
async-trait = "0.1.77"
backoff = { version = "0.4.0", features = ["futures", "tokio"] }
bitvec = "1.0.1"
fs2 = "0.4.3"
fs4 = "0.8.0"
futures = "0.3.29"
hex = "0.4.3"
libc = "0.2.152"
Expand Down
2 changes: 1 addition & 1 deletion crates/subspace-farmer-components/src/file_ext.rs
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ pub trait FileExt {

impl FileExt for File {
fn preallocate(&self, len: u64) -> Result<()> {
fs2::FileExt::allocate(self, len)
fs4::FileExt::allocate(self, len)
}

#[cfg(target_os = "linux")]
Expand Down
2 changes: 1 addition & 1 deletion crates/subspace-farmer/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ criterion = { version = "0.5.1", default-features = false, features = ["rayon",
derive_more = "0.99.17"
event-listener-primitives = "2.0.1"
fdlimit = "0.3.0"
fs4 = "0.7.0"
fs4 = "0.8.0"
futures = "0.3.29"
hex = { version = "0.4.3", features = ["serde"] }
hwlocality = { version = "1.0.0-alpha.1", features = ["vendored"], optional = true }
Expand Down
4 changes: 2 additions & 2 deletions crates/subspace-networking/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ clap = { version = "4.4.18", features = ["color", "derive"] }
derive_more = "0.99.17"
either = "1.8.1"
event-listener-primitives = "2.0.1"
fs2 = "0.4.3"
fs4 = "0.8.0"
futures = "0.3.29"
futures-timer = "3.0.2"
hex = "0.4.3"
Expand All @@ -43,7 +43,7 @@ subspace-metrics = { version = "0.1.0", path = "../../shared/subspace-metrics" }
thiserror = "1.0.56"
tokio = { version = "1.35.1", features = ["macros", "parking_lot", "rt-multi-thread", "signal", "sync", "time"] }
tracing = "0.1.40"
tracing-subscriber = { version = "0.3.18", features = ["env-filter"]}
tracing-subscriber = { version = "0.3.18", features = ["env-filter"] }
unsigned-varint = { version = "0.8.0", features = ["futures", "asynchronous_codec"] }
void = "1.0.2"

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use crate::utils::{AsyncJoinOnDrop, CollectionBatcher, Handler, HandlerFn, PeerAddress};
use async_trait::async_trait;
use event_listener_primitives::HandlerId;
use fs2::FileExt;
use fs4::FileExt;
use futures::future::{pending, Fuse};
use futures::FutureExt;
use libp2p::multiaddr::Protocol;
Expand Down Expand Up @@ -737,7 +737,7 @@ pub(super) fn remove_known_peer_addresses_internal(
if let Some(time) = first_failed_time {
// if we failed first time more than an hour ago (for Kademlia)
if *time + expired_address_duration_kademlia < now {
let address_removed = PeerAddressRemovedEvent{
let address_removed = PeerAddressRemovedEvent {
peer_id,
address: addr.clone(),
};
Expand Down

0 comments on commit 492586f

Please sign in to comment.