diff --git a/Cargo.lock b/Cargo.lock index 1f226c4..0a992c8 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -190,7 +190,6 @@ dependencies = [ "log", "serde", "serde_json", - "stdext", ] [[package]] @@ -520,9 +519,11 @@ checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" [[package]] name = "err" version = "0.1.1" +source = "git+https://git.franklinblanco.dev/franklinblanco/err.git#18cc77b6266d0fc90237a7ccb297d3eeb574f78a" dependencies = [ "serde", "sqlx", + "stdext", "thiserror", ] diff --git a/Cargo.toml b/Cargo.toml index ae98f20..e2c9eb9 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -15,5 +15,4 @@ actix-web = "4.1.0" serde_json = { version = "1" } serde = { version = "1.0", features = ["derive"] } log = { version = "0.4", features = ["serde"] } -err = { path = "../dev-deps/err" } -stdext = "0.3.1" \ No newline at end of file +err = { git = "https://git.franklinblanco.dev/franklinblanco/err.git" } \ No newline at end of file diff --git a/src/extensions/typed_response.rs b/src/extensions/typed_response.rs index 3bffe75..8ccea72 100644 --- a/src/extensions/typed_response.rs +++ b/src/extensions/typed_response.rs @@ -1,7 +1,7 @@ use actix_web::{HttpResponse, http::StatusCode, web, HttpRequest, HttpResponseBuilder, body::BoxBody, Responder}; use serde::Serialize; -use err::{Error, MessageResource, Trace}; +use err::Error; /// Defines a type for actix web routes. As the current implementation of HttpResponse doesn't let you manually specify a type. pub struct TypedResponse { pub response: HttpResponse>>>, diff --git a/src/lib.rs b/src/lib.rs index 0775b02..21c368a 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -2,5 +2,4 @@ pub mod extensions; pub mod utils; pub use extensions::typed_response::TypedResponse; -pub use extensions::service_response::ServiceResponse; -pub use stdext::function_name; \ No newline at end of file +pub use extensions::service_response::ServiceResponse; \ No newline at end of file diff --git a/src/utils/macros.rs b/src/utils/macros.rs index 3f1e69a..2662186 100644 --- a/src/utils/macros.rs +++ b/src/utils/macros.rs @@ -1,19 +1,5 @@ -/// Macro used to generate the trace object, must be called from the place where it originates, don't call from another function. -#[allow(unused_macros)] -#[macro_export] -macro_rules! trace { - () => { - dtos::dtos::feature_less::message_resource::Trace { - line: line!(), - function: actix_web_utils::function_name!().into(), - file: file!().into(), - service: env!("CARGO_PKG_NAME").into(), - } - }; -} - /// # Unwrap result or return service response /// Unwraps or turns Result -> ServiceResponse error variant #[allow(unused_macros)]