rename conduit to conduwuit finally

Signed-off-by: strawberry <strawberry@puppygock.gay>
This commit is contained in:
strawberry 2024-12-14 21:58:01 -05:00
parent c6bf8f5ea1
commit 0317cc8cc5
No known key found for this signature in database
277 changed files with 559 additions and 551 deletions

View file

@ -1,4 +1,4 @@
use conduit::{err, Result};
use conduwuit::{err, Result};
use rocksdb::{Direction, ErrorKind, IteratorMode};
//#[cfg(debug_assertions)]
@ -36,19 +36,19 @@ pub(crate) fn _into_direction(mode: &IteratorMode<'_>) -> Direction {
}
#[inline]
pub(crate) fn result<T>(r: std::result::Result<T, rocksdb::Error>) -> Result<T, conduit::Error> {
pub(crate) fn result<T>(r: std::result::Result<T, rocksdb::Error>) -> Result<T, conduwuit::Error> {
r.map_or_else(or_else, and_then)
}
#[inline(always)]
pub(crate) fn and_then<T>(t: T) -> Result<T, conduit::Error> { Ok(t) }
pub(crate) fn and_then<T>(t: T) -> Result<T, conduwuit::Error> { Ok(t) }
pub(crate) fn or_else<T>(e: rocksdb::Error) -> Result<T, conduit::Error> { Err(map_err(e)) }
pub(crate) fn or_else<T>(e: rocksdb::Error) -> Result<T, conduwuit::Error> { Err(map_err(e)) }
#[inline]
pub(crate) fn is_incomplete(e: &rocksdb::Error) -> bool { e.kind() == ErrorKind::Incomplete }
pub(crate) fn map_err(e: rocksdb::Error) -> conduit::Error {
pub(crate) fn map_err(e: rocksdb::Error) -> conduwuit::Error {
let string = e.into_string();
err!(Database(error!("{string}")))
}