summaryrefslogtreecommitdiff
path: root/op_crates
diff options
context:
space:
mode:
Diffstat (limited to 'op_crates')
-rw-r--r--op_crates/fetch/lib.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/op_crates/fetch/lib.rs b/op_crates/fetch/lib.rs
index 157ce2fb2..456358b83 100644
--- a/op_crates/fetch/lib.rs
+++ b/op_crates/fetch/lib.rs
@@ -37,6 +37,7 @@ use std::cell::RefCell;
use std::convert::From;
use std::fs::File;
use std::io::Read;
+use std::path::Path;
use std::path::PathBuf;
use std::pin::Pin;
use std::rc::Rc;
@@ -82,7 +83,7 @@ pub fn init(isolate: &mut JsRuntime) {
pub trait FetchPermissions {
fn check_net_url(&self, _url: &Url) -> Result<(), AnyError>;
- fn check_read(&self, _p: &PathBuf) -> Result<(), AnyError>;
+ fn check_read(&self, _p: &Path) -> Result<(), AnyError>;
}
/// For use with `op_fetch` when the user does not want permissions.
@@ -93,7 +94,7 @@ impl FetchPermissions for NoFetchPermissions {
Ok(())
}
- fn check_read(&self, _p: &PathBuf) -> Result<(), AnyError> {
+ fn check_read(&self, _p: &Path) -> Result<(), AnyError> {
Ok(())
}
}