diff options
author | Kitson Kelly <me@kitsonkelly.com> | 2021-02-05 05:53:02 +1100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-02-05 05:53:02 +1100 |
commit | b77fcbc518428429e39f5ba94e41fcd0418ee7a0 (patch) | |
tree | 0051cc7e5ac0c8f83278de093a2be7209cf9fcfc /op_crates/fetch | |
parent | 644a7ff2d70cbd8bfba4c87b75a047e79830c4b6 (diff) |
feat(lsp): add TS quick fix code actions (#9396)
Diffstat (limited to 'op_crates/fetch')
-rw-r--r-- | op_crates/fetch/lib.rs | 5 |
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(()) } } |