diff options
author | Lars Wirzenius <liw@liw.fi> | 2021-02-16 12:22:57 +0200 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2021-02-16 12:22:57 +0200 |
commit | 3eaefd722311abd30f13bd25c8037fbe5ed02b7e (patch) | |
tree | d3a6cad99edcefb27619cb57d24fd2a334c2d08b /src/client.rs | |
parent | 8f3436023925afb21daab7db5f52204bb84fd37f (diff) | |
download | obnam2-3eaefd722311abd30f13bd25c8037fbe5ed02b7e.tar.gz |
refactor: use bytesize::MIB constant for clearer size
Diffstat (limited to 'src/client.rs')
-rw-r--r-- | src/client.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/client.rs b/src/client.rs index e4d9be8..a475ce9 100644 --- a/src/client.rs +++ b/src/client.rs @@ -8,6 +8,7 @@ use crate::fsentry::{FilesystemEntry, FilesystemKind}; use crate::generation::{FinishedGeneration, LocalGeneration, LocalGenerationError}; use crate::genlist::GenerationList; +use bytesize::MIB; use chrono::{DateTime, Local}; use log::{debug, error, info, trace}; use reqwest::blocking::Client; @@ -17,7 +18,7 @@ use std::fs::File; use std::io::prelude::*; use std::path::{Path, PathBuf}; -const DEFAULT_CHUNK_SIZE: usize = 1024 * 1024; +const DEFAULT_CHUNK_SIZE: usize = MIB as usize; const DEVNULL: &str = "/dev/null"; #[derive(Debug, Serialize, Deserialize, Clone)] |