mirror of
https://github.com/paradigmxyz/reth.git
synced 2026-01-09 15:28:01 -05:00
docs: fix doc comments: clarify downloaded bytes and builder return condition (#17566)
This commit is contained in:
@@ -12,7 +12,7 @@ use tracing::info;
|
||||
pub struct Metadata {
|
||||
/// Total file size
|
||||
pub total_size: usize,
|
||||
/// Total file size
|
||||
/// Total downloaded bytes
|
||||
pub downloaded: usize,
|
||||
/// Download chunk size. Default 150MB.
|
||||
pub chunk_size: usize,
|
||||
@@ -141,7 +141,7 @@ impl MetadataBuilder {
|
||||
self
|
||||
}
|
||||
|
||||
/// Returns a [Metadata] if
|
||||
/// Returns a [Metadata] if total size is valid
|
||||
pub fn build(&self) -> Result<Metadata, DownloaderError> {
|
||||
match &self.total_size {
|
||||
Some(total_size) if *total_size > 0 => {
|
||||
@@ -173,7 +173,7 @@ impl MetadataBuilder {
|
||||
struct MetadataFile {
|
||||
/// Total file size
|
||||
total_size: usize,
|
||||
/// Total file size
|
||||
/// Total downloaded bytes
|
||||
downloaded: usize,
|
||||
/// Download chunk size. Default 150MB.
|
||||
chunk_size: usize,
|
||||
|
||||
@@ -2,7 +2,6 @@ use crate::db::DatabaseError;
|
||||
use reth_static_file_types::StaticFileSegment;
|
||||
|
||||
/// `UnifiedStorageWriter` related errors
|
||||
/// `StorageWriter` related errors
|
||||
#[derive(Clone, Debug, derive_more::Display, PartialEq, Eq, derive_more::Error)]
|
||||
pub enum UnifiedStorageWriterError {
|
||||
/// Database writer is missing
|
||||
|
||||
Reference in New Issue
Block a user