mirror of
https://github.com/pezkuwichain/revive-differential-tests.git
synced 2026-06-13 03:31:09 +00:00
Add a cached fs abstraction (#141)
This commit is contained in:
@@ -2,7 +2,7 @@ use std::{
|
||||
cmp::Ordering,
|
||||
collections::BTreeMap,
|
||||
fmt::Display,
|
||||
fs::{File, read_to_string},
|
||||
fs::File,
|
||||
ops::Deref,
|
||||
path::{Path, PathBuf},
|
||||
str::FromStr,
|
||||
@@ -11,7 +11,9 @@ use std::{
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
use revive_common::EVMVersion;
|
||||
use revive_dt_common::{iterators::FilesWithExtensionIterator, macros::define_wrapper_type};
|
||||
use revive_dt_common::{
|
||||
cached_fs::read_to_string, iterators::FilesWithExtensionIterator, macros::define_wrapper_type,
|
||||
};
|
||||
|
||||
use crate::{
|
||||
case::Case,
|
||||
@@ -259,7 +261,9 @@ impl Metadata {
|
||||
Ok(Box::new(std::iter::once(metadata_file_path.clone())))
|
||||
} else {
|
||||
Ok(Box::new(
|
||||
FilesWithExtensionIterator::new(self.directory()?).with_allowed_extension("sol"),
|
||||
FilesWithExtensionIterator::new(self.directory()?)
|
||||
.with_allowed_extension("sol")
|
||||
.with_use_cached_fs(true),
|
||||
))
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user