update cargo deps
This commit is contained in:
@@ -5,22 +5,26 @@ authors = ["Thomas Heck <t@b128.net>"]
|
||||
edition = "2018"
|
||||
|
||||
[dependencies]
|
||||
crdts = "4"
|
||||
crdts = "5"
|
||||
serde = "1"
|
||||
async-trait = "0.1"
|
||||
futures = "0.3"
|
||||
anyhow = "1"
|
||||
uuid = "0.8"
|
||||
data-encoding = "2"
|
||||
bytes = "0.5"
|
||||
bytes = "1"
|
||||
|
||||
[dependencies.tiny-keccak]
|
||||
version = "2"
|
||||
features = ["sha3"]
|
||||
|
||||
[dependencies.tokio]
|
||||
version = "0.2"
|
||||
features = ["fs", "stream", "io-util"]
|
||||
version = "1"
|
||||
features = ["fs", "io-util"]
|
||||
|
||||
[dependencies.tokio-stream]
|
||||
version = "0.1"
|
||||
features = ["fs"]
|
||||
|
||||
[dependencies.crdt-enc]
|
||||
path = "../crdt-enc"
|
||||
|
||||
@@ -23,6 +23,7 @@ use tokio::{
|
||||
fs,
|
||||
io::{self, AsyncWrite, AsyncWriteExt},
|
||||
};
|
||||
use tokio_stream::wrappers::ReadDirStream;
|
||||
use uuid::Uuid;
|
||||
|
||||
#[derive(Debug)]
|
||||
@@ -383,7 +384,7 @@ fn read_dir_optional(path: PathBuf) -> impl Stream<Item = Result<fs::DirEntry>>
|
||||
async move {
|
||||
match fs::read_dir(&path).await {
|
||||
Ok(dir) => {
|
||||
let entry_stream = dir.map(move |entry| {
|
||||
let entry_stream = ReadDirStream::new(dir).map(move |entry| {
|
||||
entry.with_context(|| format!("failed getting entry from {}", path.display()))
|
||||
});
|
||||
Ok(Either::Left(entry_stream))
|
||||
@@ -413,7 +414,7 @@ async fn write_content_addressible_file(
|
||||
let mut digest = Sha3::v256();
|
||||
let mut buf = bytes.buf();
|
||||
while buf.has_remaining() {
|
||||
let b = buf.bytes();
|
||||
let b = buf.chunk();
|
||||
digest.update(b);
|
||||
buf.advance(b.len());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user