Skip to content

Commit 3fa205c

Browse files
committed
chore: run cargo fix --edition
1 parent 87b4347 commit 3fa205c

File tree

41 files changed

+138
-138
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+138
-138
lines changed

internal/cardano-node/mithril-cardano-node-chain/src/chain_observer/cli_observer.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -573,7 +573,7 @@ mod tests {
573573
use super::*;
574574

575575
macro_rules! assert_cli_command {
576-
($command:expr, $expected_shell:expr, envs: $envs:expr) => {
576+
($command:expr_2021, $expected_shell:expr_2021, envs: $envs:expr_2021) => {
577577
let cmd = $command;
578578
let std_cmd = cmd.as_std();
579579
let cmd_display = format!("{std_cmd:?}");

internal/mithril-cli-helper/src/source_config.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@
33
/// Register an optional parameter in the config map when it's not None.
44
#[macro_export]
55
macro_rules! register_config_value_option {
6-
( $map:ident, $namespace:expr, $self:ident.$command:ident ) => {{
6+
( $map:ident, $namespace:expr_2021, $self:ident.$command:ident ) => {{
77
if let Some(value) = $self.$command.clone() {
88
register_config_value!($map, $namespace, $command = value);
99
}
1010
}};
11-
( $map:ident, $namespace:expr, $self:ident.$command:ident, $mapping:expr ) => {{
11+
( $map:ident, $namespace:expr_2021, $self:ident.$command:ident, $mapping:expr_2021 ) => {{
1212
if let Some(value) = $self.$command.clone() {
1313
register_config_value!($map, $namespace, $command = $mapping(value));
1414
}
@@ -18,7 +18,7 @@ macro_rules! register_config_value_option {
1818
/// Register a boolean parameter in the config map only when it's true.
1919
#[macro_export]
2020
macro_rules! register_config_value_bool {
21-
( $map:ident, $namespace:expr, $self:ident.$command:ident ) => {{
21+
( $map:ident, $namespace:expr_2021, $self:ident.$command:ident ) => {{
2222
if $self.$command {
2323
register_config_value!($map, $namespace, $command = true);
2424
}
@@ -35,14 +35,14 @@ macro_rules! register_config_value_bool {
3535
/// register_config_value!(map, namespace, identifier = value)
3636
#[macro_export]
3737
macro_rules! register_config_value {
38-
( $map:ident, $namespace:expr, $self:ident.$command:ident ) => {{
38+
( $map:ident, $namespace:expr_2021, $self:ident.$command:ident ) => {{
3939
register_config_value!($map, $namespace, $command = $self.$command);
4040
}};
41-
( $map:ident, $namespace:expr, $self:ident.$command:ident, $mapping:expr ) => {{
41+
( $map:ident, $namespace:expr_2021, $self:ident.$command:ident, $mapping:expr_2021 ) => {{
4242
register_config_value!($map, $namespace, $command = $mapping($self.$command));
4343
}};
4444

45-
( $map:ident, $namespace:expr, $command:ident = $value:expr ) => {{
45+
( $map:ident, $namespace:expr_2021, $command:ident = $value:expr_2021 ) => {{
4646
$map.insert(
4747
stringify!($command).to_string(),
4848
config::Value::new(Some($namespace), $value),

internal/mithril-metric/src/helper.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ pub mod re_export {
4949
#[macro_export]
5050
macro_rules! build_metrics_service {
5151

52-
($service:ident, $($metric_attribute:ident:$metric_type:ident ($name:literal, $help:literal $(, $labels:expr)?)),*) => {
52+
($service:ident, $($metric_attribute:ident:$metric_type:ident ($name:literal, $help:literal $(, $labels:expr_2021)?)),*) => {
5353
use $crate::helper::re_export::paste;
5454
use $crate::helper::re_export::prometheus;
5555
paste::item! {

mithril-aggregator/src/artifact_builder/cardano_database_artifacts/immutable.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -333,7 +333,7 @@ mod tests {
333333
}
334334

335335
macro_rules! assert_file_content {
336-
($path:expr, $expected_content:expr) => {
336+
($path:expr_2021, $expected_content:expr_2021) => {
337337
assert!($path.exists());
338338
let content = std::fs::read_to_string(&$path).unwrap();
339339
assert_eq!(content, $expected_content);

mithril-aggregator/src/dependency_injection/builder/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ macro_rules! get_dependency {
7575
get_dependency!($self.$attribute = $self.[<build_ $attribute>]().await?)
7676
}
7777
}};
78-
( $self:ident.$attribute:ident = $builder:expr ) => {{
78+
( $self:ident.$attribute:ident = $builder:expr_2021 ) => {{
7979
paste::paste! {
8080
if $self.$attribute.is_none() {
8181
$self.$attribute = Some($builder);
@@ -426,7 +426,7 @@ impl DependenciesBuilder {
426426
/// Create the HTTP route instance
427427
pub async fn create_http_routes(
428428
&mut self,
429-
) -> Result<impl Filter<Extract = (impl warp::Reply,), Error = warp::Rejection> + Clone> {
429+
) -> Result<impl Filter<Extract = (impl warp::Reply + use<>,), Error = warp::Rejection> + Clone + use<>> {
430430
let dependency_container = Arc::new(self.build_serve_dependencies_container().await?);
431431
let snapshot_dir = self.configuration.get_snapshot_dir()?;
432432
let router_state = RouterState::new(

mithril-aggregator/src/http_server/routes/artifact_routes/cardano_database.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ use warp::Filter;
44

55
pub fn routes(
66
router_state: &RouterState,
7-
) -> impl Filter<Extract = (impl warp::Reply,), Error = warp::Rejection> + Clone {
7+
) -> impl Filter<Extract = (impl warp::Reply + use<>,), Error = warp::Rejection> + Clone + use<> {
88
artifact_cardano_database_list(router_state)
99
.or(artifact_cardano_database_digest_list(router_state))
1010
.or(artifact_cardano_database_by_id(router_state))
@@ -14,7 +14,7 @@ pub fn routes(
1414
/// GET /artifact/cardano-database
1515
fn artifact_cardano_database_list(
1616
router_state: &RouterState,
17-
) -> impl Filter<Extract = (impl warp::Reply,), Error = warp::Rejection> + Clone {
17+
) -> impl Filter<Extract = (impl warp::Reply + use<>,), Error = warp::Rejection> + Clone + use<> {
1818
warp::path!("artifact" / "cardano-database")
1919
.and(warp::get())
2020
.and(middlewares::with_logger(router_state))
@@ -25,7 +25,7 @@ fn artifact_cardano_database_list(
2525
/// GET /artifact/cardano-database/:id
2626
fn artifact_cardano_database_by_id(
2727
dependency_manager: &RouterState,
28-
) -> impl Filter<Extract = (impl warp::Reply,), Error = warp::Rejection> + Clone {
28+
) -> impl Filter<Extract = (impl warp::Reply + use<>,), Error = warp::Rejection> + Clone + use<> {
2929
warp::path!("artifact" / "cardano-database" / String)
3030
.and(warp::get())
3131
.and(middlewares::with_client_metadata(dependency_manager))
@@ -38,7 +38,7 @@ fn artifact_cardano_database_by_id(
3838
/// GET /artifact/cardano-database/digests
3939
fn artifact_cardano_database_digest_list(
4040
router_state: &RouterState,
41-
) -> impl Filter<Extract = (impl warp::Reply,), Error = warp::Rejection> + Clone {
41+
) -> impl Filter<Extract = (impl warp::Reply + use<>,), Error = warp::Rejection> + Clone + use<> {
4242
warp::path!("artifact" / "cardano-database" / "digests")
4343
.and(warp::get())
4444
.and(middlewares::with_logger(router_state))
@@ -48,7 +48,7 @@ fn artifact_cardano_database_digest_list(
4848

4949
fn serve_cardano_database_dir(
5050
router_state: &RouterState,
51-
) -> impl Filter<Extract = (impl warp::Reply,), Error = warp::Rejection> + Clone {
51+
) -> impl Filter<Extract = (impl warp::Reply + use<>,), Error = warp::Rejection> + Clone + use<> {
5252
warp::path(crate::http_server::CARDANO_DATABASE_DOWNLOAD_PATH)
5353
.and(warp::fs::dir(
5454
router_state.configuration.cardano_db_artifacts_directory.clone(),

mithril-aggregator/src/http_server/routes/artifact_routes/cardano_stake_distribution.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ use warp::Filter;
44

55
pub fn routes(
66
router_state: &RouterState,
7-
) -> impl Filter<Extract = (impl warp::Reply,), Error = warp::Rejection> + Clone {
7+
) -> impl Filter<Extract = (impl warp::Reply + use<>,), Error = warp::Rejection> + Clone + use<> {
88
artifact_cardano_stake_distributions(router_state)
99
.or(artifact_cardano_stake_distribution_by_id(router_state))
1010
.or(artifact_cardano_stake_distribution_by_epoch(router_state))
@@ -13,7 +13,7 @@ pub fn routes(
1313
/// GET /artifact/cardano-stake-distributions
1414
fn artifact_cardano_stake_distributions(
1515
router_state: &RouterState,
16-
) -> impl Filter<Extract = (impl warp::Reply,), Error = warp::Rejection> + Clone {
16+
) -> impl Filter<Extract = (impl warp::Reply + use<>,), Error = warp::Rejection> + Clone + use<> {
1717
warp::path!("artifact" / "cardano-stake-distributions")
1818
.and(warp::get())
1919
.and(middlewares::with_logger(router_state))
@@ -24,7 +24,7 @@ fn artifact_cardano_stake_distributions(
2424
/// GET /artifact/cardano-stake-distribution/:id
2525
fn artifact_cardano_stake_distribution_by_id(
2626
router_state: &RouterState,
27-
) -> impl Filter<Extract = (impl warp::Reply,), Error = warp::Rejection> + Clone {
27+
) -> impl Filter<Extract = (impl warp::Reply + use<>,), Error = warp::Rejection> + Clone + use<> {
2828
warp::path!("artifact" / "cardano-stake-distribution" / String)
2929
.and(warp::get())
3030
.and(middlewares::with_client_metadata(router_state))
@@ -37,7 +37,7 @@ fn artifact_cardano_stake_distribution_by_id(
3737
/// GET /artifact/cardano-stake-distribution/epoch/:epoch
3838
fn artifact_cardano_stake_distribution_by_epoch(
3939
router_state: &RouterState,
40-
) -> impl Filter<Extract = (impl warp::Reply,), Error = warp::Rejection> + Clone {
40+
) -> impl Filter<Extract = (impl warp::Reply + use<>,), Error = warp::Rejection> + Clone + use<> {
4141
warp::path!("artifact" / "cardano-stake-distribution" / "epoch" / String)
4242
.and(warp::get())
4343
.and(middlewares::with_client_metadata(router_state))

mithril-aggregator/src/http_server/routes/artifact_routes/cardano_transaction.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@ use warp::Filter;
44

55
pub fn routes(
66
router_state: &RouterState,
7-
) -> impl Filter<Extract = (impl warp::Reply,), Error = warp::Rejection> + Clone {
7+
) -> impl Filter<Extract = (impl warp::Reply + use<>,), Error = warp::Rejection> + Clone + use<> {
88
artifact_cardano_transactions(router_state).or(artifact_cardano_transaction_by_id(router_state))
99
}
1010

1111
/// GET /artifact/cardano-transactions
1212
fn artifact_cardano_transactions(
1313
router_state: &RouterState,
14-
) -> impl Filter<Extract = (impl warp::Reply,), Error = warp::Rejection> + Clone {
14+
) -> impl Filter<Extract = (impl warp::Reply + use<>,), Error = warp::Rejection> + Clone + use<> {
1515
warp::path!("artifact" / "cardano-transactions")
1616
.and(warp::get())
1717
.and(middlewares::with_logger(router_state))
@@ -22,7 +22,7 @@ fn artifact_cardano_transactions(
2222
/// GET /artifact/cardano-transaction/:id
2323
fn artifact_cardano_transaction_by_id(
2424
router_state: &RouterState,
25-
) -> impl Filter<Extract = (impl warp::Reply,), Error = warp::Rejection> + Clone {
25+
) -> impl Filter<Extract = (impl warp::Reply + use<>,), Error = warp::Rejection> + Clone + use<> {
2626
warp::path!("artifact" / "cardano-transaction" / String)
2727
.and(warp::get())
2828
.and(middlewares::with_client_metadata(router_state))

mithril-aggregator/src/http_server/routes/artifact_routes/mithril_stake_distribution.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@ use warp::Filter;
44

55
pub fn routes(
66
router_state: &RouterState,
7-
) -> impl Filter<Extract = (impl warp::Reply,), Error = warp::Rejection> + Clone {
7+
) -> impl Filter<Extract = (impl warp::Reply + use<>,), Error = warp::Rejection> + Clone + use<> {
88
artifact_mithril_stake_distributions(router_state)
99
.or(artifact_mithril_stake_distribution_by_id(router_state))
1010
}
1111

1212
/// GET /artifact/mithril-stake-distributions
1313
fn artifact_mithril_stake_distributions(
1414
router_state: &RouterState,
15-
) -> impl Filter<Extract = (impl warp::Reply,), Error = warp::Rejection> + Clone {
15+
) -> impl Filter<Extract = (impl warp::Reply + use<>,), Error = warp::Rejection> + Clone + use<> {
1616
warp::path!("artifact" / "mithril-stake-distributions")
1717
.and(warp::get())
1818
.and(middlewares::with_logger(router_state))
@@ -23,7 +23,7 @@ fn artifact_mithril_stake_distributions(
2323
/// GET /artifact/mithril-stake-distribution/:id
2424
fn artifact_mithril_stake_distribution_by_id(
2525
router_state: &RouterState,
26-
) -> impl Filter<Extract = (impl warp::Reply,), Error = warp::Rejection> + Clone {
26+
) -> impl Filter<Extract = (impl warp::Reply + use<>,), Error = warp::Rejection> + Clone + use<> {
2727
warp::path!("artifact" / "mithril-stake-distribution" / String)
2828
.and(warp::get())
2929
.and(middlewares::with_client_metadata(router_state))

mithril-aggregator/src/http_server/routes/artifact_routes/snapshot.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ use warp::Filter;
44

55
pub fn routes(
66
router_state: &RouterState,
7-
) -> impl Filter<Extract = (impl warp::Reply,), Error = warp::Rejection> + Clone {
7+
) -> impl Filter<Extract = (impl warp::Reply + use<>,), Error = warp::Rejection> + Clone + use<> {
88
artifact_cardano_full_immutable_snapshots(router_state)
99
.or(artifact_cardano_full_immutable_snapshot_by_id(router_state))
1010
.or(serve_snapshots_dir(router_state))
@@ -14,7 +14,7 @@ pub fn routes(
1414
/// GET /artifact/snapshots
1515
fn artifact_cardano_full_immutable_snapshots(
1616
router_state: &RouterState,
17-
) -> impl Filter<Extract = (impl warp::Reply,), Error = warp::Rejection> + Clone {
17+
) -> impl Filter<Extract = (impl warp::Reply + use<>,), Error = warp::Rejection> + Clone + use<> {
1818
warp::path!("artifact" / "snapshots")
1919
.and(warp::get())
2020
.and(middlewares::with_logger(router_state))
@@ -25,7 +25,7 @@ fn artifact_cardano_full_immutable_snapshots(
2525
/// GET /artifact/snapshot/:id
2626
fn artifact_cardano_full_immutable_snapshot_by_id(
2727
dependency_manager: &RouterState,
28-
) -> impl Filter<Extract = (impl warp::Reply,), Error = warp::Rejection> + Clone {
28+
) -> impl Filter<Extract = (impl warp::Reply + use<>,), Error = warp::Rejection> + Clone + use<> {
2929
warp::path!("artifact" / "snapshot" / String)
3030
.and(warp::get())
3131
.and(middlewares::with_client_metadata(dependency_manager))
@@ -38,7 +38,7 @@ fn artifact_cardano_full_immutable_snapshot_by_id(
3838
/// GET /artifact/snapshots/{digest}/download
3939
fn snapshot_download(
4040
router_state: &RouterState,
41-
) -> impl Filter<Extract = (impl warp::Reply,), Error = warp::Rejection> + Clone {
41+
) -> impl Filter<Extract = (impl warp::Reply + use<>,), Error = warp::Rejection> + Clone + use<> {
4242
warp::path!("artifact" / "snapshot" / String / "download")
4343
.and(warp::get().or(warp::head()).unify())
4444
.and(middlewares::with_logger(router_state))
@@ -51,7 +51,7 @@ fn snapshot_download(
5151

5252
fn serve_snapshots_dir(
5353
router_state: &RouterState,
54-
) -> impl Filter<Extract = (impl warp::Reply,), Error = warp::Rejection> + Clone {
54+
) -> impl Filter<Extract = (impl warp::Reply + use<>,), Error = warp::Rejection> + Clone + use<> {
5555
warp::path(crate::http_server::SNAPSHOT_DOWNLOAD_PATH)
5656
.and(warp::fs::dir(
5757
router_state.configuration.snapshot_directory.clone(),

0 commit comments

Comments
 (0)