mirror of
https://gitlab.com/famedly/conduit.git
synced 2025-08-11 17:50:59 +00:00
chore(crates): bump
This commit is contained in:
parent
bdc6dabe3a
commit
88c95d36a8
17 changed files with 1344 additions and 809 deletions
|
@ -60,7 +60,7 @@ pub enum Error {
|
|||
BadDatabase(&'static str),
|
||||
#[error("uiaa")]
|
||||
Uiaa(UiaaInfo),
|
||||
#[error("{}: {1}",.0.errcode())]
|
||||
#[error("{n}: {1}", n = _0.errcode())]
|
||||
BadRequest(ErrorKind, &'static str),
|
||||
#[error("{0}")]
|
||||
Conflict(&'static str), // This is only needed for when a room alias already exists
|
||||
|
@ -70,6 +70,9 @@ pub enum Error {
|
|||
#[cfg(feature = "conduit_bin")]
|
||||
#[error("{0}")]
|
||||
PathError(#[from] axum::extract::rejection::PathRejection),
|
||||
#[cfg(feature = "conduit_bin")]
|
||||
#[error("{0}")]
|
||||
TypedHeaderError(#[from] axum_extra::typed_header::TypedHeaderRejection),
|
||||
#[error("{0}")]
|
||||
AdminCommand(&'static str),
|
||||
#[error("from {0}: {1}")]
|
||||
|
|
|
@ -59,8 +59,8 @@ pub fn string_from_bytes(bytes: &[u8]) -> Result<String, std::string::FromUtf8Er
|
|||
}
|
||||
|
||||
pub fn random_string(length: usize) -> String {
|
||||
thread_rng()
|
||||
.sample_iter(&rand::distributions::Alphanumeric)
|
||||
rand::rng()
|
||||
.sample_iter(&rand::distr::Alphanumeric)
|
||||
.take(length)
|
||||
.map(char::from)
|
||||
.collect()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue