chiark / gitweb /
dependencies: Replace cervine with either
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Tue, 13 Dec 2022 19:23:41 +0000 (19:23 +0000)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Wed, 14 Dec 2022 21:52:29 +0000 (21:52 +0000)
either is in Debian; cervine isn't.  All we really need is AsRef,
which Either is.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Cargo.lock
Cargo.toml
src/prelude.rs
src/queue.rs

index a63febabdf358ec0298f6b7dbaa3c8d53529cd76..ad6f58c1cae9be8f66d3b8b4b47cc681dff461aa 100644 (file)
@@ -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",
index d14329d3af22c621fab904dce61d378ad6f2d555..ac9e10439136530e358a13ff2616ecbe0adf90f3 100644 (file)
@@ -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
index 9fb30d54f95ad99ab5d3011aadb0c812292c5665..805442fec8dc6c199634399110c097282dda3730 100644 (file)
@@ -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};
index bdcd791f47c5ed20629cac1a0b6f2ef926cd849e..d381a785afce0e113a6104f207cf901eeb346a78 100644 (file)
@@ -45,9 +45,9 @@ pub struct FrameQueueBuf {
   queue: QueueBuf<QueuedBytes>,
 }
 
-pub type QueuedBytes = Cervine<'static, Box<[u8]>, [u8]>;
-use Cervine::Owned as QueuedBytesOwned;
-use Cervine::Borrowed as QueuedBytesBorrowed;
+pub type QueuedBytes = Either<Box<[u8]>, &'static [u8]>;
+use Either::Left as QueuedBytesOwned;
+use Either::Right as QueuedBytesBorrowed;
 
 impl<E> Debug for QueueBuf<E> where E: AsRef<[u8]> {
   #[throws(fmt::Error)]