Factor out ioc finder to db crate

This commit is contained in:
Dominik Werder
2023-08-28 22:58:47 +02:00
parent 837265a7b3
commit e05970ef56
29 changed files with 617 additions and 633 deletions

View File

@@ -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()))
}
}