Cleanups
This commit is contained in:
parent
1bd46b934d
commit
2b4608e06b
@ -2,7 +2,7 @@ use crate::descriptor_config::{SourceDescriptor, SourceDescriptorInner, VirtualS
|
||||
use crate::pointer_names::{get_pointer_name_at, POINTER_NAME_DATETIME_SPLITTER};
|
||||
use chrono::{DateTime, Utc};
|
||||
use dashmap::DashSet;
|
||||
use eyre::{bail, eyre, Context, ContextCompat, ensure};
|
||||
use eyre::{bail, ensure, eyre, Context, ContextCompat};
|
||||
use indicatif::ProgressStyle;
|
||||
use patricia_tree::PatriciaMap;
|
||||
use std::borrow::Cow;
|
||||
@ -352,7 +352,10 @@ async fn backup_dir_sources(
|
||||
submitter_task?;
|
||||
receiver_task?;
|
||||
|
||||
ensure!(completed == submitted, "completed: {completed:?} != submitted {submitted:?}");
|
||||
ensure!(
|
||||
completed == submitted,
|
||||
"completed: {completed:?} != submitted {submitted:?}"
|
||||
);
|
||||
|
||||
assert_eq!(dir_sources.len(), chunk_file_maps.len());
|
||||
|
||||
|
@ -409,9 +409,9 @@ pub fn assemble_tree_from_scan_entries(
|
||||
permissions,
|
||||
size: _unverified_size_ignore,
|
||||
} => {
|
||||
let (content, size) = chunkings
|
||||
.remove(&key_string)
|
||||
.with_context(|| format!("bad chunkings PMap: missing entry: {key_string:?}"))?;
|
||||
let (content, size) = chunkings.remove(&key_string).with_context(|| {
|
||||
format!("bad chunkings PMap: missing entry: {key_string:?}")
|
||||
})?;
|
||||
|
||||
// note: for the root, this inserts the root file entry as a child called "" within a fake root 'directory'.
|
||||
// That's fine. We'll patch this up later.
|
||||
|
@ -15,7 +15,7 @@ use std::io::{ErrorKind, SeekFrom};
|
||||
use std::path::{Path, PathBuf};
|
||||
use std::pin::Pin;
|
||||
use std::sync::Arc;
|
||||
use std::task::{ready, Context, Poll};
|
||||
use std::task::{Context, Poll};
|
||||
use std::time::Duration;
|
||||
use tokio::io::{AsyncRead, AsyncSeek, AsyncWrite, AsyncWriteExt, ReadBuf};
|
||||
use tokio_stream::StreamExt;
|
||||
|
Loading…
x
Reference in New Issue
Block a user