Rename crates.

Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
Jason Volk
2025-04-22 01:41:02 +00:00
parent 0024354345
commit 9b658d86b2
316 changed files with 1590 additions and 1593 deletions

View File

@@ -1,5 +1,5 @@
use conduwuit::Result;
use rocksdb::{Direction, ErrorKind, IteratorMode};
use tuwunel_core::Result;
//#[cfg(debug_assertions)]
macro_rules! unhandled {
@@ -38,19 +38,19 @@ pub(crate) fn _into_direction(mode: &IteratorMode<'_>) -> Direction {
#[inline]
pub(crate) fn result<T>(
r: std::result::Result<T, rocksdb::Error>,
) -> Result<T, conduwuit::Error> {
) -> Result<T, tuwunel_core::Error> {
r.map_or_else(or_else, and_then)
}
#[inline(always)]
pub(crate) fn and_then<T>(t: T) -> Result<T, conduwuit::Error> { Ok(t) }
pub(crate) fn and_then<T>(t: T) -> Result<T, tuwunel_core::Error> { Ok(t) }
pub(crate) fn or_else<T>(e: rocksdb::Error) -> Result<T, conduwuit::Error> { Err(map_err(e)) }
pub(crate) fn or_else<T>(e: rocksdb::Error) -> Result<T, tuwunel_core::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) -> conduwuit::Error {
pub(crate) fn map_err(e: rocksdb::Error) -> tuwunel_core::Error {
let kind = io_error_kind(&e.kind());
let string = e.into_string();