Skip to content

Commit 0a6d260

Browse files
committed
primitives - adapter - re-add Clone + clean up
1 parent 446756f commit 0a6d260

File tree

2 files changed

+10
-11
lines changed

2 files changed

+10
-11
lines changed

primitives/src/adapter.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ pub enum Error<AE: AdapterErrorKind> {
1717
Authorization(String),
1818
InvalidChannel(ChannelError),
1919
/// Adapter specific errors
20+
// Since we don't know the size of the Adapter Error we use a Box to limit the size of this enum
2021
Adapter(Box<AE>),
2122
Domain(DomainError),
2223
/// You need to `.unlock()` the wallet first
@@ -69,7 +70,7 @@ pub struct Session {
6970
}
7071

7172
#[async_trait]
72-
pub trait Adapter: ChannelValidator + Send + Sync + fmt::Debug {
73+
pub trait Adapter: ChannelValidator + Send + Sync + fmt::Debug + Clone {
7374
type AdapterError: AdapterErrorKind + 'static;
7475

7576
/// Unlock adapter

sentry/src/routes/analytics.rs

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,13 @@
1-
use crate::db::analytics::{
2-
advertiser_channel_ids, get_advanced_reports, get_analytics, AnalyticsType,
1+
use crate::{
2+
db::analytics::{advertiser_channel_ids, get_advanced_reports, get_analytics, AnalyticsType},
3+
success_response, Application, Auth, ResponseError, RouteParams,
34
};
4-
use crate::success_response;
5-
use crate::Application;
6-
use crate::Auth;
7-
use crate::ResponseError;
8-
use crate::RouteParams;
95
use hyper::{Body, Request, Response};
10-
use primitives::adapter::Adapter;
11-
use primitives::analytics::{AnalyticsQuery, AnalyticsResponse};
12-
use primitives::ChannelId;
6+
use primitives::{
7+
adapter::Adapter,
8+
analytics::{AnalyticsQuery, AnalyticsResponse},
9+
ChannelId,
10+
};
1311
use redis::aio::MultiplexedConnection;
1412
use slog::{error, Logger};
1513

0 commit comments

Comments
 (0)