refactor: Convert some things from static to const and refactor into drop-consts

Signed-off-by: quexeky <git@quexeky.dev>
This commit is contained in:
quexeky
2025-10-13 08:59:00 +11:00
parent ef9f8caa54
commit f0e46c4a46
22 changed files with 76 additions and 47 deletions

View File

@ -15,6 +15,7 @@ use download_manager::util::download_thread_control_flag::{
DownloadThreadControl, DownloadThreadControlFlag,
};
use download_manager::util::progress_object::ProgressHandle;
use drop_consts::{BUMP_SIZE, MAX_PACKET_LENGTH};
use log::{debug, info, warn};
use md5::{Context, Digest};
use remote::auth::generate_authorization_header;
@ -25,9 +26,6 @@ use reqwest::blocking::Response;
use crate::downloads::manifest::{ChunkBody, DownloadBucket, DownloadContext, DownloadDrop};
static MAX_PACKET_LENGTH: usize = 4096 * 4;
static BUMP_SIZE: usize = 4096 * 16;
pub struct DropWriter<W: Write> {
hasher: Context,
destination: BufWriter<W>,