From 9a062cc7a87cf81714e7be13d396d0286ba65887 Mon Sep 17 00:00:00 2001 From: alemidev Date: Fri, 20 Jan 2023 16:38:33 +0100 Subject: [PATCH] fix: small changes --- src/main.rs | 2 +- src/proto.rs | 8 ++------ 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/src/main.rs b/src/main.rs index 6e8a200..dcbd44e 100644 --- a/src/main.rs +++ b/src/main.rs @@ -57,7 +57,7 @@ async fn main() -> Result<(), Box> { let cfg = ConfigArgs::parse(); - let db = Database::connect("sqlite://./test.db").await?; + let db = Database::connect(cfg.database.clone()).await?; let store = Arc::new(Mutex::new(HashMap::new())); let app = Router::new() diff --git a/src/proto.rs b/src/proto.rs index c710dfa..91c6ca4 100644 --- a/src/proto.rs +++ b/src/proto.rs @@ -1,3 +1,5 @@ +#![allow(non_snake_case)] + use uuid::Uuid; use serde::{Serialize, Deserialize}; @@ -8,12 +10,6 @@ pub struct Error { pub cause: String, } -impl Error { - pub fn simple(msg: String) -> Error { - Error { error: msg.clone(), errorMessage: msg.clone(), cause: msg } - } -} - #[derive(Serialize, Deserialize)] pub struct Agent { pub name: String,