clean snapshot creation

This commit is contained in:
mpostma 2021-03-22 16:51:53 +01:00
parent a85e7abb0c
commit 44dcfe29aa
No known key found for this signature in database
GPG key ID: CBC8A7C1D7A28C3A
2 changed files with 23 additions and 8 deletions

View file

@ -7,7 +7,7 @@ use tar::{Archive, Builder};
use crate::error::Error;
pub fn to_tar_gz(src: &Path, dest: &Path) -> Result<(), Error> {
pub fn to_tar_gz(src: impl AsRef<Path>, dest: impl AsRef<Path>) -> Result<(), Error> {
let f = File::create(dest)?;
let gz_encoder = GzEncoder::new(f, Compression::default());
let mut tar_encoder = Builder::new(gz_encoder);