Skip to content

Commit

Permalink
refactor: Remove redundant static lifetime (#301)
Browse files Browse the repository at this point in the history
  • Loading branch information
dariusc93 authored Sep 4, 2024
1 parent 7599156 commit 8b6957f
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
- chore: Update libp2p to 0.54. [PR 289](https://github.com/dariusc93/rust-ipfs/pull/289)
- chore: Change IpfsOptions visibility, remove UninitializedIpfs::{empty, with_opt}. [PR 294](https://github.com/dariusc93/rust-ipfs/pull/294)
- refactor: Support multiple certificates for wss. [PR 295](https://github.com/dariusc93/rust-ipfs/pull/295)
- refactor: Remove redundant static lifetime. [PR 301](https://github.com/dariusc93/rust-ipfs/pull/301)

# 0.11.21
- chore: Put libp2p-webrtc-websys behind feature.
Expand Down
7 changes: 4 additions & 3 deletions src/repo/datastore/flatfs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ fn build_kv<R: AsRef<Path>, P: AsRef<Path>>(
) -> BoxStream<'static, (Vec<u8>, Vec<u8>)> {
let data_path = data_path.as_ref().to_path_buf();
let path = path.as_ref().to_path_buf();
async_stream::stream! {
let st = async_stream::stream! {
if path.is_file() {
return;
}
Expand Down Expand Up @@ -171,8 +171,9 @@ fn build_kv<R: AsRef<Path>, P: AsRef<Path>>(
}
}
}
}
.boxed()
};

st.boxed()
}

/// The column operations are all unimplemented pending at least downscoping of the
Expand Down
4 changes: 2 additions & 2 deletions src/repo/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ pub enum BlockRmError {

/// This API is being discussed and evolved, which will likely lead to breakage.
#[async_trait]
pub trait BlockStore: Debug + Send + Sync + 'static {
pub trait BlockStore: Debug + Send + Sync {
async fn init(&self) -> Result<(), Error>;
/// FIXME: redundant and never called during initialization, which is expected to happen during [`init`].
async fn open(&self) -> Result<(), Error>;
Expand All @@ -88,7 +88,7 @@ pub trait BlockStore: Debug + Send + Sync + 'static {

#[async_trait]
/// Generic layer of abstraction for a key-value data store.
pub trait DataStore: PinStore + Debug + Send + Sync + 'static {
pub trait DataStore: PinStore + Debug + Send + Sync {
async fn init(&self) -> Result<(), Error>;
async fn open(&self) -> Result<(), Error>;
/// Checks if a key is present in the datastore.
Expand Down

0 comments on commit 8b6957f

Please sign in to comment.