Skip to content
This repository was archived by the owner on Sep 26, 2020. It is now read-only.

Commit ee8e46c

Browse files
committed
Update to latest.
1 parent ef6f4c3 commit ee8e46c

File tree

6 files changed

+97
-6
lines changed

6 files changed

+97
-6
lines changed

.editorconfig

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
root = true
2+
3+
[*]
4+
charset = utf-8
5+
end_of_line = lf
6+
indent_size = 4
7+
indent_style = space
8+
insert_final_newline = true
9+
trim_trailing_whitespace = true

Cargo.lock

+56
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

README.md

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Rust IPLD daemon
2+
The ipld daemon handles a shared ipld repo.
3+
4+
## License
5+
ISC License
6+
7+
Copyright (c) 2019, David Craven and others
8+
9+
Permission to use, copy, modify, and/or distribute this software for any
10+
purpose with or without fee is hereby granted, provided that the above
11+
copyright notice and this permission notice appear in all copies.
12+
13+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
14+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
15+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
16+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
17+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
18+
OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
19+
PERFORMANCE OF THIS SOFTWARE.

client/src/lib.rs

+7-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,10 @@ use async_trait::async_trait;
66
use ipld_daemon_common::paths::{AppPaths, Paths};
77
use ipld_daemon_common::utils;
88
use libipld::cbor::WriteCbor;
9-
use libipld::{BlockError, Cid, DefaultHash as H, Hash, Result, Store};
9+
use libipld::error::{BlockError, Result};
10+
use libipld::hash::Hash;
11+
use libipld::store::Store;
12+
use libipld::{Cid, DefaultHash as H};
1013
use multibase::Base;
1114
use std::convert::TryFrom;
1215
use std::io::ErrorKind;
@@ -145,7 +148,9 @@ mod tests {
145148
use core::future::Future;
146149
use futures::join;
147150
use ipld_daemon::Service;
148-
use libipld::{create_cbor_block, create_raw_block, ipld, DefaultHash as H, MemStore};
151+
use libipld::block::{create_cbor_block, create_raw_block};
152+
use libipld::store::MemStore;
153+
use libipld::{ipld, DefaultHash as H};
149154
use model::*;
150155
use std::sync::Arc;
151156
use std::time::Duration;

daemon/src/error.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ use failure::Fail;
33
#[derive(Debug, Fail)]
44
pub enum Error {
55
#[fail(display = "{}", _0)]
6-
Block(libipld::BlockError),
6+
Block(libipld::error::BlockError),
77
#[fail(display = "{}", _0)]
88
Db(sled::Error),
99
#[fail(display = "{}", _0)]
@@ -12,8 +12,8 @@ pub enum Error {
1212
Cbor(libipld::cbor::CborError),
1313
}
1414

15-
impl From<libipld::BlockError> for Error {
16-
fn from(err: libipld::BlockError) -> Self {
15+
impl From<libipld::error::BlockError> for Error {
16+
fn from(err: libipld::error::BlockError) -> Self {
1717
Self::Block(err)
1818
}
1919
}

daemon/src/task.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
use crate::error::Error;
22
use async_std::os::unix::net::UnixStream;
33
use ipld_daemon_common::{paths::Paths, utils};
4+
use libipld::block::{decode_ipld, validate};
45
use libipld::cbor::{CborError, ReadCbor, WriteCbor};
5-
use libipld::{decode_ipld, references, validate, Cid};
6+
use libipld::gc::references;
7+
use libipld::Cid;
68
use sled::Db;
79
use slog::Logger;
810

0 commit comments

Comments
 (0)