curves_rs/
errors.rs

1use thiserror::Error;
2
3#[derive(Debug, Error)]
4pub enum Error {
5    #[error("one or more arguments are invalid")]
6    InvalidArguments
7}
8
9pub fn check_condition(condition: bool, error: Error, message: &str) {
10    match condition {
11        true => Ok(()),
12        false => Err(error)
13    }.expect(message);
14}