Factor out ioc finder to db crate
This commit is contained in:
@@ -1,20 +1,7 @@
|
||||
use err::thiserror;
|
||||
use err::ThisError;
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct Msg(pub String);
|
||||
|
||||
#[derive(Debug, ThisError)]
|
||||
pub enum Error {
|
||||
Postgres(#[from] tokio_postgres::Error),
|
||||
Msg(Msg),
|
||||
}
|
||||
|
||||
impl Error {
|
||||
pub fn from_msg<T>(msg: T) -> Self
|
||||
where
|
||||
T: Into<String>,
|
||||
{
|
||||
Self::Msg(Msg(msg.into()))
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user