From 814c04cdac2e0c0eb45abc42f6ad99484a008c8f Mon Sep 17 00:00:00 2001 From: Brandon Thomas Date: Fri, 10 Mar 2023 02:59:54 -0500 Subject: [PATCH] more cleanup --- Cargo.lock | 2 ++ crates/lib/http_server_common/Cargo.toml | 1 + .../http_server_common/src/response/to_json_success_response.rs | 2 +- crates/lib/memory_caching/Cargo.toml | 1 + crates/lib/memory_caching/src/multi_item_ttl_cache.rs | 2 +- crates/lib/memory_caching/src/single_item_ttl_cache.rs | 2 +- 6 files changed, 7 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 6ec9807c26..f76bae5bfe 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3340,6 +3340,7 @@ dependencies = [ "chrono", "container_common", "dotenv", + "errors", "language-tags 0.3.2", "log", "once_cell", @@ -4072,6 +4073,7 @@ dependencies = [ "chrono", "config", "container_common", + "errors", "log", "lru_time_cache", ] diff --git a/crates/lib/http_server_common/Cargo.toml b/crates/lib/http_server_common/Cargo.toml index 10554fd2a9..1464c91d3c 100644 --- a/crates/lib/http_server_common/Cargo.toml +++ b/crates/lib/http_server_common/Cargo.toml @@ -16,6 +16,7 @@ path = "src/lib.rs" # Internal container_common = { path = "../container_common" } +errors = { path = "../errors" } reusable_types = { path = "../../_types/reusable_types" } # External diff --git a/crates/lib/http_server_common/src/response/to_json_success_response.rs b/crates/lib/http_server_common/src/response/to_json_success_response.rs index 6d981a9d1b..50ac1a7484 100644 --- a/crates/lib/http_server_common/src/response/to_json_success_response.rs +++ b/crates/lib/http_server_common/src/response/to_json_success_response.rs @@ -1,6 +1,6 @@ use serde::Serialize; use actix_web::HttpResponse; -use container_common::anyhow_result::AnyhowResult; +use errors::AnyhowResult; pub fn to_json_success_response(response: &impl Serialize) -> AnyhowResult { let body = serde_json::to_string(&response)?; diff --git a/crates/lib/memory_caching/Cargo.toml b/crates/lib/memory_caching/Cargo.toml index 12ebf0c7e3..01476f65bf 100644 --- a/crates/lib/memory_caching/Cargo.toml +++ b/crates/lib/memory_caching/Cargo.toml @@ -17,6 +17,7 @@ path = "src/lib.rs" # Internal config = { path = "../config" } container_common = { path = "../container_common" } +errors = { path = "../errors" } # External anyhow = "1.0.40" diff --git a/crates/lib/memory_caching/src/multi_item_ttl_cache.rs b/crates/lib/memory_caching/src/multi_item_ttl_cache.rs index 5c424ad3d5..5c0c727b99 100644 --- a/crates/lib/memory_caching/src/multi_item_ttl_cache.rs +++ b/crates/lib/memory_caching/src/multi_item_ttl_cache.rs @@ -1,5 +1,5 @@ use anyhow::bail; -use container_common::anyhow_result::AnyhowResult; +use errors::AnyhowResult; use lru_time_cache::LruCache; use std::sync::{Arc, Mutex}; use std::time::Duration; diff --git a/crates/lib/memory_caching/src/single_item_ttl_cache.rs b/crates/lib/memory_caching/src/single_item_ttl_cache.rs index 65f6df340a..5daeee08b4 100644 --- a/crates/lib/memory_caching/src/single_item_ttl_cache.rs +++ b/crates/lib/memory_caching/src/single_item_ttl_cache.rs @@ -1,5 +1,5 @@ use anyhow::bail; -use container_common::anyhow_result::AnyhowResult; +use errors::AnyhowResult; use lru_time_cache::LruCache; use std::sync::{Arc, Mutex}; use std::time::Duration;