mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
chore: fix clippy (#10532)
This commit is contained in:
@ -226,6 +226,7 @@ future_not_send = "allow"
|
|||||||
needless_collect = "allow"
|
needless_collect = "allow"
|
||||||
non_send_fields_in_send_ty = "allow"
|
non_send_fields_in_send_ty = "allow"
|
||||||
redundant_pub_crate = "allow"
|
redundant_pub_crate = "allow"
|
||||||
|
too_long_first_doc_paragraph = "allow"
|
||||||
significant_drop_in_scrutinee = "allow"
|
significant_drop_in_scrutinee = "allow"
|
||||||
significant_drop_tightening = "allow"
|
significant_drop_tightening = "allow"
|
||||||
|
|
||||||
|
|||||||
@ -7,6 +7,9 @@ license.workspace = true
|
|||||||
homepage.workspace = true
|
homepage.workspace = true
|
||||||
repository.workspace = true
|
repository.workspace = true
|
||||||
|
|
||||||
|
[lints]
|
||||||
|
workspace = true
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
tempfile.workspace = true
|
tempfile.workspace = true
|
||||||
reth-db-api.workspace = true
|
reth-db-api.workspace = true
|
||||||
|
|||||||
@ -64,7 +64,7 @@ where
|
|||||||
/// Create a new collector with some capacity.
|
/// Create a new collector with some capacity.
|
||||||
///
|
///
|
||||||
/// Once the capacity (in bytes) is reached, the data is sorted and flushed to disk.
|
/// Once the capacity (in bytes) is reached, the data is sorted and flushed to disk.
|
||||||
pub fn new(buffer_capacity_bytes: usize, parent_dir: Option<PathBuf>) -> Self {
|
pub const fn new(buffer_capacity_bytes: usize, parent_dir: Option<PathBuf>) -> Self {
|
||||||
Self {
|
Self {
|
||||||
parent_dir,
|
parent_dir,
|
||||||
dir: None,
|
dir: None,
|
||||||
@ -77,12 +77,12 @@ where
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Returns number of elements currently in the collector.
|
/// Returns number of elements currently in the collector.
|
||||||
pub fn len(&self) -> usize {
|
pub const fn len(&self) -> usize {
|
||||||
self.len
|
self.len
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Returns `true` if there are currently no elements in the collector.
|
/// Returns `true` if there are currently no elements in the collector.
|
||||||
pub fn is_empty(&self) -> bool {
|
pub const fn is_empty(&self) -> bool {
|
||||||
self.len == 0
|
self.len == 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user