cargo fmt
This commit is contained in:
15
src/error.rs
15
src/error.rs
@ -1,8 +1,8 @@
|
||||
use crate::usimp::{InputEnvelope, OutputEnvelope, Event};
|
||||
use crate::usimp::{Event, InputEnvelope, OutputEnvelope};
|
||||
|
||||
use serde_json::{Value, Map};
|
||||
use bb8_postgres::tokio_postgres;
|
||||
use bb8_postgres;
|
||||
use bb8_postgres::tokio_postgres;
|
||||
use serde_json::{Map, Value};
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct Error {
|
||||
@ -32,7 +32,12 @@ pub enum ErrorKind {
|
||||
}
|
||||
|
||||
impl InputEnvelope {
|
||||
pub fn new_error(&self, kind: ErrorKind, class: ErrorClass, msg: Option<String>) -> OutputEnvelope {
|
||||
pub fn new_error(
|
||||
&self,
|
||||
kind: ErrorKind,
|
||||
class: ErrorClass,
|
||||
msg: Option<String>,
|
||||
) -> OutputEnvelope {
|
||||
OutputEnvelope {
|
||||
request_nr: self.request_nr,
|
||||
error: Some(Error::new(kind, class, msg)),
|
||||
@ -56,7 +61,7 @@ impl Error {
|
||||
class,
|
||||
msg,
|
||||
desc: None,
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
pub fn msg(&mut self, msg: String) {
|
||||
|
Reference in New Issue
Block a user