Skip to content

Commit

Permalink
chore: Upgrade to blockstore 0.5
Browse files Browse the repository at this point in the history
  • Loading branch information
oblique committed Apr 15, 2024
1 parent 5b94a30 commit 330e773
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 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 Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ rust-version = "1.75"

[dependencies]
asynchronous-codec = "0.7"
blockstore = "0.4"
blockstore = "0.5"
bytes = "1"
cid = "0.11"
fnv = "1.0.5"
Expand Down
6 changes: 3 additions & 3 deletions src/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use std::time::Duration;
use std::{fmt, mem};

use asynchronous_codec::FramedWrite;
use blockstore::{Blockstore, BlockstoreError};
use blockstore::Blockstore;
use cid::CidGeneric;
use fnv::{FnvHashMap, FnvHashSet};
use futures_timer::Delay;
Expand Down Expand Up @@ -56,9 +56,9 @@ enum TaskResult<const S: usize> {
Get(
QueryId,
CidGeneric<S>,
Result<Option<Vec<u8>>, BlockstoreError>,
Result<Option<Vec<u8>>, blockstore::Error>,
),
Set(Result<Vec<(CidGeneric<S>, Vec<u8>)>, BlockstoreError>),
Set(Result<Vec<(CidGeneric<S>, Vec<u8>)>, blockstore::Error>),
Cancelled,
}

Expand Down
4 changes: 2 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
use std::sync::Arc;
use std::task::{ready, Context, Poll};

use blockstore::{Blockstore, BlockstoreError};
use blockstore::Blockstore;
use cid::CidGeneric;
use client::SendingState;
use futures_util::stream::{SelectAll, StreamExt};
Expand Down Expand Up @@ -85,7 +85,7 @@ pub enum Error {

/// Error received when interacting with blockstore
#[error("Blockstore error: {0}")]
Blockstore(#[from] BlockstoreError),
Blockstore(#[from] blockstore::Error),
}

/// Alias for a [`Result`] with the error type [`beetswap::Error`].
Expand Down
4 changes: 2 additions & 2 deletions src/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use std::sync::Arc;
use std::task::{ready, Context, Poll};

use asynchronous_codec::FramedWrite;
use blockstore::{Blockstore, BlockstoreError};
use blockstore::Blockstore;
use cid::CidGeneric;
use fnv::{FnvHashMap, FnvHashSet};
use futures_util::sink::SinkExt;
Expand Down Expand Up @@ -58,7 +58,7 @@ enum TaskResult<const S: usize> {

struct GetCidResult<const S: usize> {
cid: CidGeneric<S>,
data: Result<Option<Vec<u8>>, BlockstoreError>,
data: Result<Option<Vec<u8>>, blockstore::Error>,
}

#[derive(Debug, Default)]
Expand Down

0 comments on commit 330e773

Please sign in to comment.