Skip to content

Commit a1a7021

Browse files
committed
fix: apply formatting
1 parent 21f7590 commit a1a7021

File tree

4 files changed

+11
-8
lines changed

4 files changed

+11
-8
lines changed

primitives/src/sentry.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ use std::collections::HashMap;
66
use std::fmt;
77
use std::hash::Hash;
88

9-
109
#[derive(Serialize, Deserialize, Debug)]
1110
#[serde(rename_all = "camelCase")]
1211
pub struct LastApproved {

sentry/src/db/analytics.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ pub async fn get_analytics(
114114
applied_limit,
115115
);
116116

117-
println!("{}", sql_query );
117+
println!("{}", sql_query);
118118

119119
// execute query
120120
pool.run(move |connection| async move {

sentry/src/event_reducer.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
use primitives::sentry::{AggregateEvents, Event, EventAggregate};
2-
use primitives::{Channel, ValidatorId, BigNum};
31
use crate::analytics_recorder::get_payout;
2+
use primitives::sentry::{AggregateEvents, Event, EventAggregate};
3+
use primitives::{BigNum, Channel, ValidatorId};
44

55
// @TODO: Remove attribute once we use this function!
66
#[allow(dead_code)]
@@ -19,7 +19,6 @@ pub(crate) fn reduce(channel: &Channel, initial_aggr: &mut EventAggregate, ev: &
1919
let merge = merge_impression_ev(clicks, &publisher, &payout);
2020

2121
initial_aggr.events.insert("CLICK".to_owned(), merge);
22-
2322
}
2423
Event::Close => {
2524
let creator = channel.creator.clone();
@@ -38,7 +37,7 @@ pub(crate) fn reduce(channel: &Channel, initial_aggr: &mut EventAggregate, ev: &
3837
fn merge_impression_ev(
3938
impression: Option<&AggregateEvents>,
4039
earner: &ValidatorId,
41-
payout: &BigNum
40+
payout: &BigNum,
4241
) -> AggregateEvents {
4342
let mut impression = impression.map(Clone::clone).unwrap_or_default();
4443

sentry/src/routes/channel.rs

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,9 +117,14 @@ pub async fn last_approved<A: Adapter>(
117117
.unwrap());
118118
}
119119

120-
let state_root = match approve_state.as_ref().expect("value should be present").msg.clone() {
120+
let state_root = match approve_state
121+
.as_ref()
122+
.expect("value should be present")
123+
.msg
124+
.clone()
125+
{
121126
MessageTypes::ApproveState(approve_state) => approve_state.state_root,
122-
_ => return Err(ResponseError::BadRequest("invalid request".to_string()))
127+
_ => return Err(ResponseError::BadRequest("invalid request".to_string())),
123128
};
124129

125130
let new_state = latest_new_state(&app.pool, &channel, &state_root).await?;

0 commit comments

Comments
 (0)