summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMatan Kushner <hello@matchai.dev>2020-02-03 17:13:59 -0500
committerMatan Kushner <hello@matchai.dev>2020-02-03 17:13:59 -0500
commit860accac558750ba3574c26dd285760a77a4cfb1 (patch)
tree9e5641d36b4c3284bf3554c55106a0e28896725d /src
parentf14aef476950532123b5bba1f1a8bfd6372f7768 (diff)
chore: readd from_path function
Despite the function not being used directly, it was being used in tests. Readding the function so tests will pass.
Diffstat (limited to 'src')
-rw-r--r--src/context.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/context.rs b/src/context.rs
index 46c51177e..6faa78844 100644
--- a/src/context.rs
+++ b/src/context.rs
@@ -177,6 +177,10 @@ pub struct DirContents {
}
impl DirContents {
+ fn from_path(base: &PathBuf) -> Result<Self, std::io::Error> {
+ Self::from_path_with_timeout(base, Duration::from_secs(30))
+ }
+
fn from_path_with_timeout(base: &PathBuf, timeout: Duration) -> Result<Self, std::io::Error> {
let start = SystemTime::now();