add math utils; integrate checked expression macros
Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
parent
611f09829e
commit
5e72d36800
7 changed files with 68 additions and 0 deletions
|
@ -35,6 +35,12 @@ pub enum Error {
|
|||
FromUtf8Error(#[from] std::string::FromUtf8Error),
|
||||
#[error("{0}")]
|
||||
TryFromSliceError(#[from] std::array::TryFromSliceError),
|
||||
#[error("{0}")]
|
||||
TryFromIntError(#[from] std::num::TryFromIntError),
|
||||
#[error("{0}")]
|
||||
ParseIntError(#[from] std::num::ParseIntError),
|
||||
#[error("{0}")]
|
||||
ParseFloatError(#[from] std::num::ParseFloatError),
|
||||
|
||||
// third-party
|
||||
#[error("Regex error: {0}")]
|
||||
|
@ -63,6 +69,8 @@ pub enum Error {
|
|||
InconsistentRoomState(&'static str, ruma::OwnedRoomId),
|
||||
|
||||
// conduwuit
|
||||
#[error("Arithmetic operation failed: {0}")]
|
||||
Arithmetic(&'static str),
|
||||
#[error("There was a problem with your configuration: {0}")]
|
||||
BadConfig(String),
|
||||
#[error("{0}")]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue