rename conduit to conduwuit finally
Signed-off-by: strawberry <strawberry@puppygock.gay>
This commit is contained in:
parent
c6bf8f5ea1
commit
0317cc8cc5
277 changed files with 559 additions and 551 deletions
|
@ -1,5 +1,5 @@
|
|||
[package]
|
||||
name = "conduit_database"
|
||||
name = "conduwuit_database"
|
||||
categories.workspace = true
|
||||
description.workspace = true
|
||||
edition.workspace = true
|
||||
|
@ -37,7 +37,7 @@ zstd_compression = [
|
|||
[dependencies]
|
||||
arrayvec.workspace = true
|
||||
async-channel.workspace = true
|
||||
conduit-core.workspace = true
|
||||
conduwuit-core.workspace = true
|
||||
const-str.workspace = true
|
||||
futures.workspace = true
|
||||
log.workspace = true
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
use std::{ops::Index, sync::Arc};
|
||||
|
||||
use conduit::{err, Result, Server};
|
||||
use conduwuit::{err, Result, Server};
|
||||
|
||||
use crate::{
|
||||
maps,
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
use arrayvec::ArrayVec;
|
||||
use conduit::{checked, debug::DebugInspect, err, utils::string, Error, Result};
|
||||
use conduwuit::{checked, debug::DebugInspect, err, utils::string, Error, Result};
|
||||
use serde::{
|
||||
de,
|
||||
de::{DeserializeSeed, Visitor},
|
||||
|
@ -331,7 +331,7 @@ impl<'a, 'de: 'a> de::Deserializer<'de> for &'a mut Deserializer<'de> {
|
|||
|
||||
fn deserialize_any<V: Visitor<'de>>(self, visitor: V) -> Result<V::Value> {
|
||||
debug_assert_eq!(
|
||||
conduit::debug::type_name::<V>(),
|
||||
conduwuit::debug::type_name::<V>(),
|
||||
"serde_json::value::de::<impl serde::de::Deserialize for \
|
||||
serde_json::value::Value>::deserialize::ValueVisitor",
|
||||
"deserialize_any: type not expected"
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
use std::convert::identity;
|
||||
|
||||
use conduit::Result;
|
||||
use conduwuit::Result;
|
||||
use serde::Deserialize;
|
||||
|
||||
pub trait Deserialized {
|
||||
|
|
|
@ -6,7 +6,7 @@ use std::{
|
|||
sync::{atomic::AtomicU32, Arc, Mutex, RwLock},
|
||||
};
|
||||
|
||||
use conduit::{debug, error, info, utils::time::rfc2822_from_seconds, warn, Err, Result, Server};
|
||||
use conduwuit::{debug, error, info, utils::time::rfc2822_from_seconds, warn, Err, Result, Server};
|
||||
use rocksdb::{
|
||||
backup::{BackupEngine, BackupEngineOptions},
|
||||
perf::get_memory_usage_stats,
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
use std::{fmt, fmt::Debug, ops::Deref};
|
||||
|
||||
use conduit::Result;
|
||||
use conduwuit::Result;
|
||||
use rocksdb::DBPinnableSlice;
|
||||
use serde::{Deserialize, Serialize, Serializer};
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
use conduit::Result;
|
||||
use conduwuit::Result;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use smallvec::SmallVec;
|
||||
|
||||
|
|
|
@ -27,7 +27,7 @@ use std::{
|
|||
sync::Arc,
|
||||
};
|
||||
|
||||
use conduit::Result;
|
||||
use conduwuit::Result;
|
||||
use rocksdb::{AsColumnFamilyRef, ColumnFamily, ReadOptions, ReadTier, WriteOptions};
|
||||
|
||||
use crate::{watchers::Watchers, Engine};
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
use std::{convert::AsRef, fmt::Debug, future::Future, io::Write, sync::Arc};
|
||||
|
||||
use arrayvec::ArrayVec;
|
||||
use conduit::{
|
||||
use conduwuit::{
|
||||
err, implement,
|
||||
utils::{future::TryExtExt, result::FlatOk},
|
||||
Result,
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
use std::{fmt::Debug, future::Future, sync::Arc};
|
||||
|
||||
use conduit::implement;
|
||||
use conduwuit::implement;
|
||||
use futures::stream::StreamExt;
|
||||
use serde::Serialize;
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
use std::{convert::AsRef, fmt::Debug, io::Write, sync::Arc};
|
||||
|
||||
use arrayvec::ArrayVec;
|
||||
use conduit::{err, implement, utils::result::MapExpect, Err, Result};
|
||||
use conduwuit::{err, implement, utils::result::MapExpect, Err, Result};
|
||||
use futures::{Future, FutureExt};
|
||||
use serde::Serialize;
|
||||
use tokio::task;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
use std::{convert::AsRef, fmt::Debug, sync::Arc};
|
||||
|
||||
use conduit::{err, implement, utils::IterStream, Result};
|
||||
use conduwuit::{err, implement, utils::IterStream, Result};
|
||||
use futures::{Stream, StreamExt};
|
||||
use serde::Serialize;
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
use std::{convert::AsRef, fmt::Debug, io::Write};
|
||||
|
||||
use arrayvec::ArrayVec;
|
||||
use conduit::implement;
|
||||
use conduwuit::implement;
|
||||
use rocksdb::WriteBatchWithTransaction;
|
||||
use serde::Serialize;
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
use conduit::{implement, Result};
|
||||
use conduwuit::{implement, Result};
|
||||
use futures::{Stream, StreamExt};
|
||||
use serde::Deserialize;
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
use std::{convert::AsRef, fmt::Debug, sync::Arc};
|
||||
|
||||
use conduit::{implement, Result};
|
||||
use conduwuit::{implement, Result};
|
||||
use futures::{FutureExt, Stream, StreamExt, TryFutureExt, TryStreamExt};
|
||||
use rocksdb::Direction;
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
use std::{convert::AsRef, fmt::Debug, sync::Arc};
|
||||
|
||||
use conduit::{implement, Result};
|
||||
use conduwuit::{implement, Result};
|
||||
use futures::{
|
||||
future,
|
||||
stream::{Stream, StreamExt},
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
use std::{convert::AsRef, fmt::Debug, io::Write};
|
||||
|
||||
use arrayvec::ArrayVec;
|
||||
use conduit::implement;
|
||||
use conduwuit::implement;
|
||||
use serde::Serialize;
|
||||
|
||||
use crate::{keyval::KeyBuf, ser, util::or_else};
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
use conduit::{implement, Result};
|
||||
use conduwuit::{implement, Result};
|
||||
use futures::{Stream, StreamExt};
|
||||
use serde::Deserialize;
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
use std::{convert::AsRef, fmt::Debug, sync::Arc};
|
||||
|
||||
use conduit::{implement, Result};
|
||||
use conduwuit::{implement, Result};
|
||||
use futures::{FutureExt, Stream, StreamExt, TryFutureExt, TryStreamExt};
|
||||
use rocksdb::Direction;
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
use std::{convert::AsRef, fmt::Debug, sync::Arc};
|
||||
|
||||
use conduit::{implement, Result};
|
||||
use conduwuit::{implement, Result};
|
||||
use futures::{
|
||||
future,
|
||||
stream::{Stream, StreamExt},
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
use conduit::{implement, Result};
|
||||
use conduwuit::{implement, Result};
|
||||
use futures::stream::{Stream, StreamExt};
|
||||
use serde::Deserialize;
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
use std::{convert::AsRef, fmt::Debug, sync::Arc};
|
||||
|
||||
use conduit::{implement, Result};
|
||||
use conduwuit::{implement, Result};
|
||||
use futures::{
|
||||
stream::{Stream, StreamExt},
|
||||
FutureExt, TryFutureExt, TryStreamExt,
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
use std::{convert::AsRef, fmt::Debug, sync::Arc};
|
||||
|
||||
use conduit::{implement, Result};
|
||||
use conduwuit::{implement, Result};
|
||||
use futures::{
|
||||
future,
|
||||
stream::{Stream, StreamExt},
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
use conduit::{implement, Result};
|
||||
use conduwuit::{implement, Result};
|
||||
use futures::stream::{Stream, StreamExt};
|
||||
use serde::Deserialize;
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
use std::{convert::AsRef, fmt::Debug, sync::Arc};
|
||||
|
||||
use conduit::{implement, Result};
|
||||
use conduwuit::{implement, Result};
|
||||
use futures::{
|
||||
stream::{Stream, StreamExt},
|
||||
FutureExt, TryFutureExt, TryStreamExt,
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
use std::{convert::AsRef, fmt::Debug, sync::Arc};
|
||||
|
||||
use conduit::{implement, Result};
|
||||
use conduwuit::{implement, Result};
|
||||
use futures::{
|
||||
future,
|
||||
stream::{Stream, StreamExt},
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
use std::{collections::BTreeMap, sync::Arc};
|
||||
|
||||
use conduit::Result;
|
||||
use conduwuit::Result;
|
||||
|
||||
use crate::{Engine, Map};
|
||||
|
||||
|
|
|
@ -20,7 +20,7 @@ pub(crate) use self::{
|
|||
util::{or_else, result},
|
||||
};
|
||||
|
||||
extern crate conduit_core as conduit;
|
||||
extern crate conduwuit_core as conduwuit;
|
||||
extern crate rust_rocksdb as rocksdb;
|
||||
|
||||
pub use self::{
|
||||
|
@ -33,6 +33,6 @@ pub use self::{
|
|||
ser::{serialize, serialize_to, serialize_to_vec, Interfix, Json, Separator, SEP},
|
||||
};
|
||||
|
||||
conduit::mod_ctor! {}
|
||||
conduit::mod_dtor! {}
|
||||
conduit::rustc_flags_capture! {}
|
||||
conduwuit::mod_ctor! {}
|
||||
conduwuit::mod_dtor! {}
|
||||
conduwuit::rustc_flags_capture! {}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
use std::{cmp, collections::HashMap, convert::TryFrom};
|
||||
|
||||
use conduit::{err, utils, Config, Result};
|
||||
use conduwuit::{err, utils, Config, Result};
|
||||
use rocksdb::{
|
||||
statistics::StatsLevel, BlockBasedOptions, Cache, DBCompactionStyle, DBCompressionType, DBRecoveryMode, Env,
|
||||
LogLevel, LruCacheOptions, Options, UniversalCompactOptions, UniversalCompactionStopStyle,
|
||||
|
|
|
@ -7,7 +7,7 @@ use std::{
|
|||
};
|
||||
|
||||
use async_channel::{bounded, Receiver, RecvError, Sender};
|
||||
use conduit::{debug, debug_warn, defer, err, implement, result::DebugInspect, Result, Server};
|
||||
use conduwuit::{debug, debug_warn, defer, err, implement, result::DebugInspect, Result, Server};
|
||||
use futures::{channel::oneshot, TryFutureExt};
|
||||
use oneshot::Sender as ResultSender;
|
||||
use rocksdb::Direction;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
use std::io::Write;
|
||||
|
||||
use conduit::{debug::type_name, err, result::DebugInspect, utils::exchange, Error, Result};
|
||||
use conduwuit::{debug::type_name, err, result::DebugInspect, utils::exchange, Error, Result};
|
||||
use serde::{ser, Serialize};
|
||||
|
||||
use crate::util::unhandled;
|
||||
|
|
|
@ -5,7 +5,7 @@ mod keys_rev;
|
|||
|
||||
use std::sync::Arc;
|
||||
|
||||
use conduit::{utils::exchange, Error, Result};
|
||||
use conduwuit::{utils::exchange, Error, Result};
|
||||
use rocksdb::{ColumnFamily, DBRawIteratorWithThreadMode, ReadOptions};
|
||||
|
||||
pub(crate) use self::{items::Items, items_rev::ItemsRev, keys::Keys, keys_rev::KeysRev};
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
use std::{convert, pin::Pin, sync::Arc};
|
||||
|
||||
use conduit::Result;
|
||||
use conduwuit::Result;
|
||||
use futures::{
|
||||
stream::FusedStream,
|
||||
task::{Context, Poll},
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
use std::{convert, pin::Pin, sync::Arc};
|
||||
|
||||
use conduit::Result;
|
||||
use conduwuit::Result;
|
||||
use futures::{
|
||||
stream::FusedStream,
|
||||
task::{Context, Poll},
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
use std::{convert, pin::Pin, sync::Arc};
|
||||
|
||||
use conduit::Result;
|
||||
use conduwuit::Result;
|
||||
use futures::{
|
||||
stream::FusedStream,
|
||||
task::{Context, Poll},
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
use std::{convert, pin::Pin, sync::Arc};
|
||||
|
||||
use conduit::Result;
|
||||
use conduwuit::Result;
|
||||
use futures::{
|
||||
stream::FusedStream,
|
||||
task::{Context, Poll},
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
use std::fmt::Debug;
|
||||
|
||||
use arrayvec::ArrayVec;
|
||||
use conduit::ruma::{serde::Raw, RoomId, UserId};
|
||||
use conduwuit::ruma::{serde::Raw, RoomId, UserId};
|
||||
use serde::Serialize;
|
||||
|
||||
use crate::{
|
||||
|
@ -53,7 +53,7 @@ fn ser_overflow() {
|
|||
|
||||
#[test]
|
||||
fn ser_complex() {
|
||||
use conduit::ruma::Mxc;
|
||||
use conduwuit::ruma::Mxc;
|
||||
|
||||
#[derive(Debug, Serialize)]
|
||||
struct Dim {
|
||||
|
@ -90,7 +90,7 @@ fn ser_complex() {
|
|||
|
||||
#[test]
|
||||
fn ser_json() {
|
||||
use conduit::ruma::api::client::filter::FilterDefinition;
|
||||
use conduwuit::ruma::api::client::filter::FilterDefinition;
|
||||
|
||||
let filter = FilterDefinition {
|
||||
event_fields: Some(vec!["content.body".to_owned()]),
|
||||
|
@ -105,7 +105,7 @@ fn ser_json() {
|
|||
|
||||
#[test]
|
||||
fn ser_json_value() {
|
||||
use conduit::ruma::api::client::filter::FilterDefinition;
|
||||
use conduwuit::ruma::api::client::filter::FilterDefinition;
|
||||
|
||||
let filter = FilterDefinition {
|
||||
event_fields: Some(vec!["content.body".to_owned()]),
|
||||
|
@ -146,7 +146,7 @@ fn ser_json_macro() {
|
|||
#[test]
|
||||
#[should_panic(expected = "serializing string at the top-level")]
|
||||
fn ser_json_raw() {
|
||||
use conduit::ruma::api::client::filter::FilterDefinition;
|
||||
use conduwuit::ruma::api::client::filter::FilterDefinition;
|
||||
|
||||
let filter = FilterDefinition {
|
||||
event_fields: Some(vec!["content.body".to_owned()]),
|
||||
|
@ -162,7 +162,7 @@ fn ser_json_raw() {
|
|||
#[test]
|
||||
#[should_panic(expected = "you can skip serialization instead")]
|
||||
fn ser_json_raw_json() {
|
||||
use conduit::ruma::api::client::filter::FilterDefinition;
|
||||
use conduwuit::ruma::api::client::filter::FilterDefinition;
|
||||
|
||||
let filter = FilterDefinition {
|
||||
event_fields: Some(vec!["content.body".to_owned()]),
|
||||
|
|
|
@ -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}")))
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue