Skip to content

Commit 7774bdf

Browse files
committed
removed unused bin from cargo.toml and ran cargo fmt
1 parent d3721d0 commit 7774bdf

File tree

2 files changed

+18
-16
lines changed

2 files changed

+18
-16
lines changed

sentry/Cargo.toml

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,6 @@ default-run = "sentry"
1515
all-features = true
1616
rustdoc-args = ["--cfg", "docsrs"]
1717

18-
[[bin]]
19-
name = "seed"
20-
test = false # Is tested by default.
21-
doctest = false # Documentation examples are tested by default.
22-
bench = false # Is benchmarked by default.
23-
doc = false # Is documented by default.
24-
required-features = ["test-util"]
25-
2618
[features]
2719

2820
test-util = ["primitives/test-util", "adapter/test-util", "dashmap"]

sentry/src/application.rs

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,16 @@ use tower_http::cors::CorsLayer;
2121

2222
use adapter::{client::Locked, Adapter, Dummy, Ethereum};
2323
use primitives::{
24-
config::Environment, sentry::campaign_create::CreateCampaign, test_util::CAMPAIGNS,
25-
unified_num::FromWhole, Campaign, ChainOf, Deposit, UnifiedNum, ValidatorId, spender::Spendable,
24+
config::Environment, sentry::campaign_create::CreateCampaign, spender::Spendable,
25+
test_util::CAMPAIGNS, unified_num::FromWhole, Campaign, ChainOf, Deposit, UnifiedNum,
26+
ValidatorId,
2627
};
2728

2829
use crate::{
29-
db::{CampaignRemaining, DbPool, campaign::insert_campaign, insert_channel, spendable::insert_spendable},
30+
db::{
31+
campaign::insert_campaign, insert_channel, spendable::insert_spendable, CampaignRemaining,
32+
DbPool,
33+
},
3034
middleware::auth::authenticate,
3135
platform::PlatformApi,
3236
routes::{
@@ -331,7 +335,7 @@ pub async fn seed_dummy(app: Application<Dummy>) -> Result<(), Box<dyn std::erro
331335
uid: ValidatorId::from(campaign_to_create.creator),
332336
chain: campaign.chain.clone(),
333337
};
334-
let _result = create_campaign(
338+
create_campaign(
335339
Json(campaign_to_create),
336340
Extension(auth),
337341
Extension(Arc::new(app)),
@@ -400,11 +404,17 @@ pub async fn seed_ethereum(app: Application<Ethereum>) -> Result<(), Box<dyn std
400404
channel: campaign.context.channel,
401405
deposit: Deposit {
402406
total: UnifiedNum::from_u64(10_000_000),
403-
}
407+
},
404408
};
405-
insert_channel(&app.pool, &channel_context).await.expect("Should insert channel of seed campaign");
406-
insert_campaign(&app.pool, &campaign.context).await.expect("Should insert seed campaign");
407-
insert_spendable(app.pool.clone(), &spendable).await.expect("Should insert spendable for campaign creator");
409+
insert_channel(&app.pool, &channel_context)
410+
.await
411+
.expect("Should insert channel of seed campaign");
412+
insert_campaign(&app.pool, &campaign.context)
413+
.await
414+
.expect("Should insert seed campaign");
415+
insert_spendable(app.pool.clone(), &spendable)
416+
.await
417+
.expect("Should insert spendable for campaign creator");
408418

409419
Ok(())
410420
}

0 commit comments

Comments
 (0)