mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 19:09:54 +00:00
add empty_line_after_doc_comments and remove option_if_let_else (#8539)
This commit is contained in:
@ -154,6 +154,7 @@ unused_rounding = "warn"
|
|||||||
useless_let_if_seq = "warn"
|
useless_let_if_seq = "warn"
|
||||||
use_self = "warn"
|
use_self = "warn"
|
||||||
missing_const_for_fn = "warn"
|
missing_const_for_fn = "warn"
|
||||||
|
empty_line_after_doc_comments = "warn"
|
||||||
|
|
||||||
# These are nursery lints which have findings. Allow them for now. Some are not
|
# These are nursery lints which have findings. Allow them for now. Some are not
|
||||||
# quite mature enough for use in our codebase and some we don't really want.
|
# quite mature enough for use in our codebase and some we don't really want.
|
||||||
@ -162,13 +163,11 @@ as_ptr_cast_mut = "allow"
|
|||||||
cognitive_complexity = "allow"
|
cognitive_complexity = "allow"
|
||||||
collection_is_never_read = "allow"
|
collection_is_never_read = "allow"
|
||||||
debug_assert_with_mut_call = "allow"
|
debug_assert_with_mut_call = "allow"
|
||||||
empty_line_after_doc_comments = "allow"
|
|
||||||
fallible_impl_from = "allow"
|
fallible_impl_from = "allow"
|
||||||
future_not_send = "allow"
|
future_not_send = "allow"
|
||||||
iter_on_single_items = "allow"
|
iter_on_single_items = "allow"
|
||||||
needless_collect = "allow"
|
needless_collect = "allow"
|
||||||
non_send_fields_in_send_ty = "allow"
|
non_send_fields_in_send_ty = "allow"
|
||||||
option_if_let_else = "allow"
|
|
||||||
redundant_pub_crate = "allow"
|
redundant_pub_crate = "allow"
|
||||||
significant_drop_in_scrutinee = "allow"
|
significant_drop_in_scrutinee = "allow"
|
||||||
significant_drop_tightening = "allow"
|
significant_drop_tightening = "allow"
|
||||||
|
|||||||
@ -3,7 +3,6 @@
|
|||||||
use std::{fmt, num::ParseIntError, str::FromStr};
|
use std::{fmt, num::ParseIntError, str::FromStr};
|
||||||
|
|
||||||
/// A macro that generates types that maps "0" to "None" when parsing CLI arguments.
|
/// A macro that generates types that maps "0" to "None" when parsing CLI arguments.
|
||||||
|
|
||||||
macro_rules! zero_as_none {
|
macro_rules! zero_as_none {
|
||||||
($type_name:ident, $inner_type:ty) => {
|
($type_name:ident, $inner_type:ty) => {
|
||||||
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
|
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
|
||||||
|
|||||||
@ -48,8 +48,8 @@ mod ipc;
|
|||||||
mod rpc_service;
|
mod rpc_service;
|
||||||
|
|
||||||
/// Ipc Server implementation
|
/// Ipc Server implementation
|
||||||
|
///
|
||||||
// This is an adapted `jsonrpsee` Server, but for `Ipc` connections.
|
/// This is an adapted `jsonrpsee` Server, but for `Ipc` connections.
|
||||||
pub struct IpcServer<HttpMiddleware = Identity, RpcMiddleware = Identity> {
|
pub struct IpcServer<HttpMiddleware = Identity, RpcMiddleware = Identity> {
|
||||||
/// The endpoint we listen for incoming transactions
|
/// The endpoint we listen for incoming transactions
|
||||||
endpoint: String,
|
endpoint: String,
|
||||||
|
|||||||
@ -1518,7 +1518,7 @@ pub struct RpcServerConfig {
|
|||||||
jwt_secret: Option<JwtSecret>,
|
jwt_secret: Option<JwtSecret>,
|
||||||
}
|
}
|
||||||
|
|
||||||
/// === impl RpcServerConfig ===
|
// === impl RpcServerConfig ===
|
||||||
|
|
||||||
impl RpcServerConfig {
|
impl RpcServerConfig {
|
||||||
/// Creates a new config with only http set
|
/// Creates a new config with only http set
|
||||||
|
|||||||
@ -1641,8 +1641,7 @@ impl<TX: DbTx> TransactionsProviderExt for DatabaseProvider<TX> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Calculates the hash of the given transaction
|
// Calculates the hash of the given transaction
|
||||||
|
|
||||||
impl<TX: DbTx> TransactionsProvider for DatabaseProvider<TX> {
|
impl<TX: DbTx> TransactionsProvider for DatabaseProvider<TX> {
|
||||||
fn transaction_id(&self, tx_hash: TxHash) -> ProviderResult<Option<TxNumber>> {
|
fn transaction_id(&self, tx_hash: TxHash) -> ProviderResult<Option<TxNumber>> {
|
||||||
Ok(self.tx.get::<tables::TransactionHashNumbers>(tx_hash)?)
|
Ok(self.tx.get::<tables::TransactionHashNumbers>(tx_hash)?)
|
||||||
|
|||||||
Reference in New Issue
Block a user