Skip to content

Commit c1eafb2

Browse files
committed
Pull in nightly rust-fmt, use vid rustfmt.toml
1 parent 9f8ea8c commit c1eafb2

File tree

287 files changed

+3677
-3565
lines changed

Some content is hidden

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

287 files changed

+3677
-3565
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
@@ -144,7 +145,7 @@ pub mod ERC1967Proxy {
144145
match _t {
145146
alloy_sol_types::private::AssertTypeEq::<
146147
<UnderlyingSolTuple as alloy_sol_types::SolType>::RustType,
147-
>(_) => {}
148+
>(_) => {},
148149
}
149150
}
150151
#[automatically_derived]
@@ -211,7 +212,7 @@ pub mod ERC1967Proxy {
211212
match _t {
212213
alloy_sol_types::private::AssertTypeEq::<
213214
<UnderlyingSolTuple as alloy_sol_types::SolType>::RustType,
214-
>(_) => {}
215+
>(_) => {},
215216
}
216217
}
217218
#[automatically_derived]
@@ -277,7 +278,7 @@ pub mod ERC1967Proxy {
277278
match _t {
278279
alloy_sol_types::private::AssertTypeEq::<
279280
<UnderlyingSolTuple as alloy_sol_types::SolType>::RustType,
280-
>(_) => {}
281+
>(_) => {},
281282
}
282283
}
283284
#[automatically_derived]
@@ -337,7 +338,7 @@ pub mod ERC1967Proxy {
337338
match _t {
338339
alloy_sol_types::private::AssertTypeEq::<
339340
<UnderlyingSolTuple as alloy_sol_types::SolType>::RustType,
340-
>(_) => {}
341+
>(_) => {},
341342
}
342343
}
343344
#[automatically_derived]
@@ -505,7 +506,7 @@ pub mod ERC1967Proxy {
505506
match _t {
506507
alloy_sol_types::private::AssertTypeEq::<
507508
<UnderlyingSolTuple as alloy_sol_types::SolType>::RustType,
508-
>(_) => {}
509+
>(_) => {},
509510
}
510511
}
511512
#[automatically_derived]
@@ -588,16 +589,16 @@ pub mod ERC1967Proxy {
588589
match self {
589590
Self::AddressEmptyCode(_) => {
590591
<AddressEmptyCode as alloy_sol_types::SolError>::SELECTOR
591-
}
592+
},
592593
Self::ERC1967InvalidImplementation(_) => {
593594
<ERC1967InvalidImplementation as alloy_sol_types::SolError>::SELECTOR
594-
}
595+
},
595596
Self::ERC1967NonPayable(_) => {
596597
<ERC1967NonPayable as alloy_sol_types::SolError>::SELECTOR
597-
}
598+
},
598599
Self::FailedInnerCall(_) => {
599600
<FailedInnerCall as alloy_sol_types::SolError>::SELECTOR
600-
}
601+
},
601602
}
602603
}
603604
#[inline]
@@ -682,37 +683,37 @@ pub mod ERC1967Proxy {
682683
match self {
683684
Self::AddressEmptyCode(inner) => {
684685
<AddressEmptyCode as alloy_sol_types::SolError>::abi_encoded_size(inner)
685-
}
686+
},
686687
Self::ERC1967InvalidImplementation(inner) => {
687688
<ERC1967InvalidImplementation as alloy_sol_types::SolError>::abi_encoded_size(
688689
inner,
689690
)
690-
}
691+
},
691692
Self::ERC1967NonPayable(inner) => {
692693
<ERC1967NonPayable as alloy_sol_types::SolError>::abi_encoded_size(inner)
693-
}
694+
},
694695
Self::FailedInnerCall(inner) => {
695696
<FailedInnerCall as alloy_sol_types::SolError>::abi_encoded_size(inner)
696-
}
697+
},
697698
}
698699
}
699700
#[inline]
700701
fn abi_encode_raw(&self, out: &mut alloy_sol_types::private::Vec<u8>) {
701702
match self {
702703
Self::AddressEmptyCode(inner) => {
703704
<AddressEmptyCode as alloy_sol_types::SolError>::abi_encode_raw(inner, out)
704-
}
705+
},
705706
Self::ERC1967InvalidImplementation(inner) => {
706707
<ERC1967InvalidImplementation as alloy_sol_types::SolError>::abi_encode_raw(
707708
inner, out,
708709
)
709-
}
710+
},
710711
Self::ERC1967NonPayable(inner) => {
711712
<ERC1967NonPayable as alloy_sol_types::SolError>::abi_encode_raw(inner, out)
712-
}
713+
},
713714
Self::FailedInnerCall(inner) => {
714715
<FailedInnerCall as alloy_sol_types::SolError>::abi_encode_raw(inner, out)
715-
}
716+
},
716717
}
717718
}
718719
}
@@ -748,7 +749,7 @@ pub mod ERC1967Proxy {
748749
Some(<Upgraded as alloy_sol_types::SolEvent>::SIGNATURE_HASH) => {
749750
<Upgraded as alloy_sol_types::SolEvent>::decode_raw_log(topics, data, validate)
750751
.map(Self::Upgraded)
751-
}
752+
},
752753
_ => alloy_sol_types::private::Err(alloy_sol_types::Error::InvalidLog {
753754
name: <Self as alloy_sol_types::SolEventInterface>::NAME,
754755
log: alloy_sol_types::private::Box::new(
@@ -772,7 +773,7 @@ pub mod ERC1967Proxy {
772773
match self {
773774
Self::Upgraded(inner) => {
774775
alloy_sol_types::private::IntoLogData::into_log_data(inner)
775-
}
776+
},
776777
}
777778
}
778779
}

0 commit comments

Comments
 (0)