cargo fmt

This commit is contained in:
2021-06-05 14:29:09 +02:00
parent 473b553662
commit 01e9b9c6ae
11 changed files with 341 additions and 169 deletions

View File

@ -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) {