From 80d97ab89f8b73fc04551c564293c3f8aa303c7a Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Tue, 13 Dec 2022 19:23:41 +0000 Subject: [PATCH] dependencies: Replace cervine with either either is in Debian; cervine isn't. All we really need is AsRef, which Either is. Signed-off-by: Ian Jackson --- Cargo.lock | 8 +------- Cargo.toml | 2 +- src/prelude.rs | 2 +- src/queue.rs | 6 +++--- 4 files changed, 6 insertions(+), 12 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index a63feba..ad6f58c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -100,12 +100,6 @@ version = "1.0.73" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2fff2a6927b3bb87f9595d67196a70493f627687a71d87a0d692242c33f58c11" -[[package]] -name = "cervine" -version = "0.0.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f0db89834ef04fc63d2f136327b42d532b45def0345213d28690a3446c7bdb5" - [[package]] name = "cfg-if" version = "1.0.0" @@ -458,8 +452,8 @@ version = "1.0.0" dependencies = [ "backtrace", "base64", - "cervine", "educe", + "either", "env_logger", "extend", "eyre", diff --git a/Cargo.toml b/Cargo.toml index d14329d..ac9e104 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -32,6 +32,7 @@ hippotat-macros = { version = "1.0.0", path = "macros" } backtrace = "0.3" base64 = "0.13" educe = "0.4" +either = "1" env_logger = "0.9" futures = "0.3" heck = "0.4" @@ -66,4 +67,3 @@ eyre = "0.6" # deps not in sid: indenter (see below) indenter = "0.3" # no deps not in sid fehler = "1" # no deps (other than fehler-macros, obvs) lazy-regex = "2" # no deps not in sid -cervine = "0.0" # no (non-dev)-deps not in sid diff --git a/src/prelude.rs b/src/prelude.rs index 9fb30d5..805442f 100644 --- a/src/prelude.rs +++ b/src/prelude.rs @@ -25,8 +25,8 @@ pub use std::sync::Arc; pub use std::task::Poll; pub use std::time::{SystemTime, UNIX_EPOCH}; -pub use cervine::Cow as Cervine; pub use educe::Educe; +pub use either::Either; pub use extend::ext; pub use fehler::{throw, throws}; pub use futures::{poll, future, FutureExt, StreamExt, TryStreamExt}; diff --git a/src/queue.rs b/src/queue.rs index bdcd791..d381a78 100644 --- a/src/queue.rs +++ b/src/queue.rs @@ -45,9 +45,9 @@ pub struct FrameQueueBuf { queue: QueueBuf, } -pub type QueuedBytes = Cervine<'static, Box<[u8]>, [u8]>; -use Cervine::Owned as QueuedBytesOwned; -use Cervine::Borrowed as QueuedBytesBorrowed; +pub type QueuedBytes = Either, &'static [u8]>; +use Either::Left as QueuedBytesOwned; +use Either::Right as QueuedBytesBorrowed; impl Debug for QueueBuf where E: AsRef<[u8]> { #[throws(fmt::Error)] -- 2.30.2