Skip to content

Commit

Permalink
use PathList::from_iter
Browse files Browse the repository at this point in the history
  • Loading branch information
aawsome committed Mar 12, 2024
1 parent 6cc4309 commit e38d7e3
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions crates/core/tests/integration.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,8 @@ impl TestSource {
Self(tmp)
}

fn paths(&self) -> Result<PathList> {
let sources = self.0.path().to_str().unwrap();

let path_list = PathList::from_string(sources)?;

Ok(path_list)
fn paths(&self) -> PathList {
PathList::from_iter(Some(self.0.path().to_path_buf()))
}
}

Expand Down Expand Up @@ -94,7 +90,7 @@ fn backup() -> Result<()> {
// uncomment for logging output
// SimpleLogger::init(log::LevelFilter::Debug, Config::default())?;
let source = set_up_testdata("backup-data.tar.gz")?;
let paths = &source.paths()?;
let paths = &source.paths();

let repo = set_up_repo()?.to_indexed_ids()?;
// we use as_path to not depend on the actual tempdir
Expand Down Expand Up @@ -133,7 +129,7 @@ fn backup() -> Result<()> {
#[test]
fn backup_dry_run() -> Result<()> {
let source = &set_up_testdata("backup-data.tar.gz")?;
let paths = &source.paths()?;
let paths = &source.paths();
let repo = set_up_repo()?.to_indexed_ids()?;
// we use as_path to not depend on the actual tempdir
let opts = BackupOptions::default()
Expand Down

0 comments on commit e38d7e3

Please sign in to comment.