diff options
author | edef <edef@unfathomable.blue> | 2022-04-20 19:02:00 +0000 |
---|---|---|
committer | edef <edef@unfathomable.blue> | 2022-04-20 19:02:00 +0000 |
commit | dcdc7d0411b724e3b5cfe35830f426f585c63c43 (patch) | |
tree | 6518187e0dad97bdb204f2e88ee546d2c3f5cd26 /ripple | |
parent | 4c784b0b1562d7465908fcb671c4f48ce299d272 (diff) | |
download | unf-legacy-dcdc7d0411b724e3b5cfe35830f426f585c63c43.tar.zst |
ripple/fossil: prefer anyhow::Result over io::Result
Change-Id: I4a94b84ef456b427422757a899fdce6198fd01a1
Diffstat (limited to 'ripple')
-rw-r--r-- | ripple/Cargo.lock | 1 | ||||
-rw-r--r-- | ripple/fossil/Cargo.toml | 1 | ||||
-rw-r--r-- | ripple/fossil/src/lib.rs | 3 |
3 files changed, 4 insertions, 1 deletions
diff --git a/ripple/Cargo.lock b/ripple/Cargo.lock index 359d48d..c433d68 100644 --- a/ripple/Cargo.lock +++ b/ripple/Cargo.lock @@ -220,6 +220,7 @@ checksum = "37ab347416e802de484e4d03c7316c48f1ecb56574dfd4a46a80f173ce1de04d" name = "fossil" version = "0.1.0" dependencies = [ + "anyhow", "bao", "blake3", "byteorder", diff --git a/ripple/fossil/Cargo.toml b/ripple/fossil/Cargo.toml index ecfa5b4..04d0824 100644 --- a/ripple/fossil/Cargo.toml +++ b/ripple/fossil/Cargo.toml @@ -18,6 +18,7 @@ libc = "0.2.112" env_logger = "0.9.0" lazy_static = "1.4.0" bao = "0.12.0" +anyhow = "1.0.53" [build-dependencies] prost-build = "0.8.0" diff --git a/ripple/fossil/src/lib.rs b/ripple/fossil/src/lib.rs index 9e380f2..8858196 100644 --- a/ripple/fossil/src/lib.rs +++ b/ripple/fossil/src/lib.rs @@ -2,6 +2,7 @@ // SPDX-License-Identifier: OSL-3.0 use { + anyhow::Result, byteorder::{BigEndian, ByteOrder}, prost::Message, std::{ @@ -26,7 +27,7 @@ pub struct Store { } impl Store { - pub fn open(path: impl AsRef<Path>) -> io::Result<Store> { + pub fn open(path: impl AsRef<Path>) -> Result<Store> { let db = sled::open(path)?; Ok(Store { db }) } |