main logging
This commit is contained in:
parent
7e9cc00d7c
commit
9c2fdd95c6
2 changed files with 7 additions and 4 deletions
|
|
@ -41,8 +41,11 @@ fn main() {
|
|||
error!("error: {e:?}");
|
||||
file = upl;
|
||||
}
|
||||
ChunkState::Finished => break,
|
||||
};
|
||||
ChunkState::Finished(path) => {
|
||||
info!("Finished {:?}!", path.display());
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
debug!("file: {file:?}");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ pub enum UploadError {
|
|||
pub enum ChunkState {
|
||||
Ok(FileUploading),
|
||||
Err(FileUploading, UploadError),
|
||||
Finished,
|
||||
Finished(PathBuf),
|
||||
}
|
||||
|
||||
impl FileUploading {
|
||||
|
|
@ -86,7 +86,7 @@ impl FileUploading {
|
|||
self.offset = res_offset;
|
||||
|
||||
if self.offset == self.size {
|
||||
return ChunkState::Finished;
|
||||
return ChunkState::Finished(self.path);
|
||||
}
|
||||
|
||||
ChunkState::Ok(self)
|
||||
|
|
|
|||
Loading…
Reference in a new issue