Skip to content

Commit

Permalink
cargo_fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
pompon0 committed Jul 26, 2024
1 parent 15551a3 commit c6e86ee
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
3 changes: 1 addition & 2 deletions node/actors/network/src/gossip/batch_votes.rs
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
//! Global state distributed by active attesters, observed by all the nodes in the network.
use super::metrics;
use crate::watch::Watch;
use std::{collections::HashSet, fmt, sync::Arc};
use zksync_concurrency::sync;
use zksync_consensus_roles::attester;

use super::metrics;

#[derive(Debug, Default)]
pub(super) struct BatchUpdateStats {
num_added: usize,
Expand Down
9 changes: 7 additions & 2 deletions node/libs/protobuf_build/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,10 @@ impl Config {
.relative_to(&manifest.proto_root.to_name()?)
.unwrap();
let rust_path = root_path.clone().join(proto_rel.to_rust_module()?);
if extern_paths.insert(file.package(), rust_path.clone()).is_none() {
if extern_paths
.insert(file.package(), rust_path.clone())
.is_none()
{
config.extern_path(format!(".{}", file.package()), rust_path.to_string());
}
}
Expand All @@ -340,7 +343,9 @@ impl Config {
let code = config
.generate(vec![(module.clone(), file.clone())])
.context("generation failed")?;
let Some(code) = code.get(&module) else { continue };
let Some(code) = code.get(&module) else {
continue;
};
let code = syn::parse_str(code).with_context(|| {
format!("prost_build generated invalid code for {}", file.name())
})?;
Expand Down

0 comments on commit c6e86ee

Please sign in to comment.