Skip to content

Commit b9f17e4

Browse files
committed
ref: removed unused imports
1 parent c7db249 commit b9f17e4

File tree

3 files changed

+7
-12
lines changed

3 files changed

+7
-12
lines changed

src/flow_queue/connection.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
use lapin::{Channel, Connection, ConnectionProperties};
2-
use std::sync::Arc;
3-
use tokio::sync::Mutex;
1+
use lapin::Connection;
42

53
pub async fn build_connection(rabbitmq_url: &str) -> Connection {
64
match Connection::connect(rabbitmq_url, lapin::ConnectionProperties::default()).await {

src/flow_store/service.rs

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,18 @@
11
use crate::flow_store::connection::FlowStore;
22
use async_trait::async_trait;
33
use log::error;
4-
use redis::aio::ConnectionLike;
54
use redis::{AsyncCommands, JsonAsyncCommands, RedisError, RedisResult};
6-
use serde_json::to_string;
75
use tucana::shared::{Flow, Flows};
86

97
#[derive(Debug)]
108
pub struct FlowStoreError {
11-
kind: FlowStoreErrorKind,
12-
flow_id: i64,
13-
reason: String,
9+
pub kind: FlowStoreErrorKind,
10+
pub flow_id: i64,
11+
pub reason: String,
1412
}
1513

1614
#[derive(Debug)]
17-
enum FlowStoreErrorKind {
15+
pub enum FlowStoreErrorKind {
1816
Serialization,
1917
RedisOperation,
2018
}
@@ -164,7 +162,6 @@ mod tests {
164162
let connection = create_flow_store_connection(url).await;
165163

166164
{
167-
use redis::AsyncCommands;
168165
let mut con = connection.lock().await;
169166

170167
let _: () = redis::cmd("FLUSHALL")

src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
//#[cfg(feature = "flow_store")]
1+
#[cfg(feature = "flow_store")]
22
pub mod flow_store;
33

4-
//#[cfg(feature = "flow_queue")]
4+
#[cfg(feature = "flow_queue")]
55
pub mod flow_queue;

0 commit comments

Comments
 (0)