Skip to content

Commit cea2114

Browse files
committed
Pull in nightly rust-fmt, use vid rustfmt
1 parent 0fa901b commit cea2114

File tree

284 files changed

+3548
-3428
lines changed

Some content is hidden

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

284 files changed

+3548
-3428
lines changed

builder/src/bin/permissionless-builder.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -122,11 +122,11 @@ async fn main() -> anyhow::Result<()> {
122122
match (base, upgrade) {
123123
(FeeVersion::VERSION, MarketplaceVersion::VERSION) => {
124124
run::<SequencerVersions<FeeVersion, MarketplaceVersion>>(genesis, opt).await
125-
}
125+
},
126126
(FeeVersion::VERSION, _) => run::<SequencerVersions<FeeVersion, V0_0>>(genesis, opt).await,
127127
(MarketplaceVersion::VERSION, _) => {
128128
run::<SequencerVersions<MarketplaceVersion, V0_0>>(genesis, opt).await
129-
}
129+
},
130130
_ => panic!(
131131
"Invalid base ({base}) and upgrade ({upgrade}) versions specified in the toml file."
132132
),

builder/src/lib.rs

+11-10
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,12 @@ pub fn run_builder_api_service(url: Url, source: ProxyGlobalState<SeqTypes>) {
4040

4141
#[cfg(test)]
4242
pub mod testing {
43+
use std::{
44+
num::NonZeroUsize,
45+
sync::Arc,
46+
time::{Duration, Instant},
47+
};
48+
4349
use async_lock::RwLock;
4450
use committable::Committable;
4551
use espresso_types::{
@@ -74,18 +80,13 @@ pub mod testing {
7480
},
7581
HotShotConfig, PeerConfig, ValidatorConfig,
7682
};
83+
use jf_signature::bls_over_bn254::VerKey;
7784
use sequencer::{context::Consensus, network, SequencerApiVersion};
78-
use std::{
79-
num::NonZeroUsize,
80-
sync::Arc,
81-
time::{Duration, Instant},
82-
};
8385
use surf_disco::Client;
8486
use vbs::version::StaticVersion;
8587

8688
use super::*;
8789
use crate::non_permissioned::BuilderConfig;
88-
use jf_signature::bls_over_bn254::VerKey;
8990

9091
#[derive(Clone)]
9192
pub struct HotShotTestConfig {
@@ -414,10 +415,10 @@ pub mod testing {
414415
{
415416
Ok(response) => {
416417
tracing::info!("Received txn submitted response : {:?}", response);
417-
}
418+
},
418419
Err(e) => {
419420
panic!("Error submitting private transaction {:?}", e);
420-
}
421+
},
421422
}
422423

423424
let seed = [207_u8; 32];
@@ -514,10 +515,10 @@ pub mod testing {
514515
Ok(response) => {
515516
tracing::info!("Received Builder Key : {:?}", response);
516517
assert_eq!(response, builder_pub_key);
517-
}
518+
},
518519
Err(e) => {
519520
panic!("Error getting builder key {:?}", e);
520-
}
521+
},
521522
}
522523
}
523524
}

builder/src/non_permissioned.rs

+2-4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use std::{collections::VecDeque, num::NonZeroUsize, time::Duration};
1+
use std::{collections::VecDeque, num::NonZeroUsize, sync::Arc, time::Duration};
22

33
use anyhow::Context;
44
use async_broadcast::broadcast;
@@ -22,10 +22,8 @@ use hotshot_types::{
2222
node_implementation::Versions, EncodeBytes,
2323
},
2424
};
25-
use marketplace_builder_shared::block::ParentBlockReferences;
26-
use marketplace_builder_shared::utils::EventServiceStream;
25+
use marketplace_builder_shared::{block::ParentBlockReferences, utils::EventServiceStream};
2726
use sequencer::{catchup::StatePeers, L1Params, SequencerApiVersion};
28-
use std::sync::Arc;
2927
use tide_disco::Url;
3028
use tokio::spawn;
3129
use vbs::version::StaticVersionType;

client/src/lib.rs

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
use std::time::Duration;
2+
13
use anyhow::Context;
24
use espresso_types::{FeeAccount, FeeAmount, FeeMerkleTree, Header};
35
use ethers::types::Address;
@@ -6,7 +8,6 @@ use jf_merkle_tree::{
68
prelude::{MerkleProof, Sha3Node},
79
MerkleTreeScheme,
810
};
9-
use std::time::Duration;
1011
use surf_disco::{
1112
error::ClientError,
1213
socket::{Connection, Unsupported},
@@ -110,7 +111,7 @@ impl SequencerClient {
110111
} else {
111112
sleep(Duration::from_millis(200)).await;
112113
}
113-
}
114+
},
114115
}
115116
};
116117

contract-bindings-alloy/src/erc1967proxy.rs

+21-20
Original file line numberDiff line numberDiff line change
@@ -94,8 +94,9 @@ interface ERC1967Proxy {
9494
clippy::empty_structs_with_brackets
9595
)]
9696
pub mod ERC1967Proxy {
97-
use super::*;
9897
use alloy::sol_types as alloy_sol_types;
98+
99+
use super::*;
99100
/// The creation / init bytecode of the contract.
100101
///
101102
/// ```text
@@ -143,7 +144,7 @@ pub mod ERC1967Proxy {
143144
match _t {
144145
alloy_sol_types::private::AssertTypeEq::<
145146
<UnderlyingSolTuple as alloy_sol_types::SolType>::RustType,
146-
>(_) => {}
147+
>(_) => {},
147148
}
148149
}
149150
#[automatically_derived]
@@ -209,7 +210,7 @@ pub mod ERC1967Proxy {
209210
match _t {
210211
alloy_sol_types::private::AssertTypeEq::<
211212
<UnderlyingSolTuple as alloy_sol_types::SolType>::RustType,
212-
>(_) => {}
213+
>(_) => {},
213214
}
214215
}
215216
#[automatically_derived]
@@ -275,7 +276,7 @@ pub mod ERC1967Proxy {
275276
match _t {
276277
alloy_sol_types::private::AssertTypeEq::<
277278
<UnderlyingSolTuple as alloy_sol_types::SolType>::RustType,
278-
>(_) => {}
279+
>(_) => {},
279280
}
280281
}
281282
#[automatically_derived]
@@ -335,7 +336,7 @@ pub mod ERC1967Proxy {
335336
match _t {
336337
alloy_sol_types::private::AssertTypeEq::<
337338
<UnderlyingSolTuple as alloy_sol_types::SolType>::RustType,
338-
>(_) => {}
339+
>(_) => {},
339340
}
340341
}
341342
#[automatically_derived]
@@ -501,7 +502,7 @@ pub mod ERC1967Proxy {
501502
match _t {
502503
alloy_sol_types::private::AssertTypeEq::<
503504
<UnderlyingSolTuple as alloy_sol_types::SolType>::RustType,
504-
>(_) => {}
505+
>(_) => {},
505506
}
506507
}
507508
#[automatically_derived]
@@ -580,16 +581,16 @@ pub mod ERC1967Proxy {
580581
match self {
581582
Self::AddressEmptyCode(_) => {
582583
<AddressEmptyCode as alloy_sol_types::SolError>::SELECTOR
583-
}
584+
},
584585
Self::ERC1967InvalidImplementation(_) => {
585586
<ERC1967InvalidImplementation as alloy_sol_types::SolError>::SELECTOR
586-
}
587+
},
587588
Self::ERC1967NonPayable(_) => {
588589
<ERC1967NonPayable as alloy_sol_types::SolError>::SELECTOR
589-
}
590+
},
590591
Self::FailedInnerCall(_) => {
591592
<FailedInnerCall as alloy_sol_types::SolError>::SELECTOR
592-
}
593+
},
593594
}
594595
}
595596
#[inline]
@@ -674,37 +675,37 @@ pub mod ERC1967Proxy {
674675
match self {
675676
Self::AddressEmptyCode(inner) => {
676677
<AddressEmptyCode as alloy_sol_types::SolError>::abi_encoded_size(inner)
677-
}
678+
},
678679
Self::ERC1967InvalidImplementation(inner) => {
679680
<ERC1967InvalidImplementation as alloy_sol_types::SolError>::abi_encoded_size(
680681
inner,
681682
)
682-
}
683+
},
683684
Self::ERC1967NonPayable(inner) => {
684685
<ERC1967NonPayable as alloy_sol_types::SolError>::abi_encoded_size(inner)
685-
}
686+
},
686687
Self::FailedInnerCall(inner) => {
687688
<FailedInnerCall as alloy_sol_types::SolError>::abi_encoded_size(inner)
688-
}
689+
},
689690
}
690691
}
691692
#[inline]
692693
fn abi_encode_raw(&self, out: &mut alloy_sol_types::private::Vec<u8>) {
693694
match self {
694695
Self::AddressEmptyCode(inner) => {
695696
<AddressEmptyCode as alloy_sol_types::SolError>::abi_encode_raw(inner, out)
696-
}
697+
},
697698
Self::ERC1967InvalidImplementation(inner) => {
698699
<ERC1967InvalidImplementation as alloy_sol_types::SolError>::abi_encode_raw(
699700
inner, out,
700701
)
701-
}
702+
},
702703
Self::ERC1967NonPayable(inner) => {
703704
<ERC1967NonPayable as alloy_sol_types::SolError>::abi_encode_raw(inner, out)
704-
}
705+
},
705706
Self::FailedInnerCall(inner) => {
706707
<FailedInnerCall as alloy_sol_types::SolError>::abi_encode_raw(inner, out)
707-
}
708+
},
708709
}
709710
}
710711
}
@@ -739,7 +740,7 @@ pub mod ERC1967Proxy {
739740
Some(<Upgraded as alloy_sol_types::SolEvent>::SIGNATURE_HASH) => {
740741
<Upgraded as alloy_sol_types::SolEvent>::decode_raw_log(topics, data, validate)
741742
.map(Self::Upgraded)
742-
}
743+
},
743744
_ => alloy_sol_types::private::Err(alloy_sol_types::Error::InvalidLog {
744745
name: <Self as alloy_sol_types::SolEventInterface>::NAME,
745746
log: alloy_sol_types::private::Box::new(
@@ -763,7 +764,7 @@ pub mod ERC1967Proxy {
763764
match self {
764765
Self::Upgraded(inner) => {
765766
alloy_sol_types::private::IntoLogData::into_log_data(inner)
766-
}
767+
},
767768
}
768769
}
769770
}

0 commit comments

Comments
 (0)