From 26207fa93422be95f77e58070bb77d3d4ce141df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bruno=20Fran=C3=A7a?= Date: Fri, 15 Mar 2024 19:02:44 +0000 Subject: [PATCH] - Edited Contributing.md - Removed no longer needed lint allow - Formatted imports --- .github/CONTRIBUTING.md | 8 +++++++- node/Cargo.toml | 2 -- node/tests/src/main.rs | 3 +-- node/tools/src/bin/deployer.rs | 4 +--- node/tools/src/config.rs | 5 ++--- node/tools/src/rpc/methods/config.rs | 3 +-- node/tools/src/rpc/server.rs | 3 +-- 7 files changed, 13 insertions(+), 15 deletions(-) diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index ad353249..80cf46cb 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -1,7 +1,13 @@ # Contribution Guidelines Hello! Thanks for your interest in joining the mission to accelerate the mass adoption of crypto for personal -sovereignty! We welcome contributions from anyone on the internet, and are grateful for even the smallest of fixes! +sovereignty! We welcome contributions from anyone on the internet. + +Note, however, that all the contributions are subject to review, and not every contribution is guaranteed to be merged. +It is highly advised to reach out to developers (for example, by creating an issue) before preparing a significant +change in the codebase, and explicitly confirm that this contribution will be considered for merge. Otherwise, it is +possible to discover that a feature you have spent some time on does not align with the core team vision or capacity to +maintain a high quality of given submission long term. ## Ways to contribute diff --git a/node/Cargo.toml b/node/Cargo.toml index 0d2e3bcd..80f955fe 100644 --- a/node/Cargo.toml +++ b/node/Cargo.toml @@ -156,7 +156,5 @@ wildcard_dependencies = "warn" redundant_locals = "allow" needless_pass_by_ref_mut = "allow" box_default = "allow" -# remove once fix to https://github.com/rust-lang/rust-clippy/issues/11764 is available on CI. -map_identity = "allow" # &*x is not equivalent to x, because it affects borrowing in closures. borrow_deref_ref = "allow" diff --git a/node/tests/src/main.rs b/node/tests/src/main.rs index 5b873846..46bebaec 100644 --- a/node/tests/src/main.rs +++ b/node/tests/src/main.rs @@ -1,9 +1,8 @@ //! This is a simple test for the RPC server. It checks if the server is running and can respond to. -use std::{fs, io::Write, net::SocketAddr, path::PathBuf, str::FromStr}; - use anyhow::{ensure, Context}; use clap::{Parser, Subcommand}; use jsonrpsee::{core::client::ClientT, http_client::HttpClientBuilder, rpc_params, types::Params}; +use std::{fs, io::Write, net::SocketAddr, path::PathBuf, str::FromStr}; use zksync_consensus_tools::{ k8s, rpc::methods::{health_check::HealthCheck, RPCMethod}, diff --git a/node/tools/src/bin/deployer.rs b/node/tools/src/bin/deployer.rs index 78e6bbf8..bf71df85 100644 --- a/node/tools/src/bin/deployer.rs +++ b/node/tools/src/bin/deployer.rs @@ -1,9 +1,7 @@ //! Deployer for the kubernetes cluster. -use std::collections::HashMap; -use std::{fs, path::PathBuf}; - use anyhow::Context; use clap::{Parser, Subcommand}; +use std::{collections::HashMap, fs, path::PathBuf}; use zksync_consensus_crypto::{Text, TextFmt}; use zksync_consensus_roles::{node, validator}; use zksync_consensus_tools::{k8s, AppConfig}; diff --git a/node/tools/src/config.rs b/node/tools/src/config.rs index 43494057..53f608e2 100644 --- a/node/tools/src/config.rs +++ b/node/tools/src/config.rs @@ -2,13 +2,12 @@ use crate::{proto, store}; use anyhow::Context as _; use serde_json::{ser::Formatter, Serializer}; -use std::net::Ipv4Addr; -use std::str::FromStr; use std::{ collections::{HashMap, HashSet}, fs, - net::SocketAddr, + net::{Ipv4Addr, SocketAddr}, path::{Path, PathBuf}, + str::FromStr, }; use zksync_concurrency::ctx; use zksync_consensus_bft as bft; diff --git a/node/tools/src/rpc/methods/config.rs b/node/tools/src/rpc/methods/config.rs index f03e9353..3c94e382 100644 --- a/node/tools/src/rpc/methods/config.rs +++ b/node/tools/src/rpc/methods/config.rs @@ -1,7 +1,6 @@ //! Peers method for RPC server. -use crate::{config::encode_json, decode_json, AppConfig}; - use super::RPCMethod; +use crate::{config::encode_json, decode_json, AppConfig}; use jsonrpsee::types::{error::ErrorCode, Params}; use std::fs::{self}; use zksync_protobuf::serde::Serde; diff --git a/node/tools/src/rpc/server.rs b/node/tools/src/rpc/server.rs index 3b66dfa0..c23801be 100644 --- a/node/tools/src/rpc/server.rs +++ b/node/tools/src/rpc/server.rs @@ -1,6 +1,5 @@ -use crate::AppConfig; - use super::methods::{config::ConfigInfo, health_check::HealthCheck, peers::PeersInfo, RPCMethod}; +use crate::AppConfig; use jsonrpsee::server::{middleware::http::ProxyGetRequestLayer, RpcModule, Server}; use std::net::SocketAddr; use zksync_concurrency::{ctx, scope};