Skip to content

Commit 07a79f9

Browse files
stepanchegfacebook-github-bot
authored andcommitted
Remove feature io_error_more
Summary: Not really needed. Reviewed By: bobyangyf Differential Revision: D40893443 fbshipit-source-id: 708da746fe5932ca757382fbabd4c8ce704b6190
1 parent 01af813 commit 07a79f9

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

starlark/src/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -365,7 +365,6 @@
365365
#![feature(ptr_metadata)]
366366
#![feature(thread_local)]
367367
#![feature(array_from_fn)]
368-
#![feature(io_error_more)]
369368
// Plugins
370369
#![cfg_attr(feature = "gazebo_lint", feature(plugin))]
371370
#![cfg_attr(feature = "gazebo_lint", allow(deprecated))] // :(

starlark/src/lsp/test.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,8 @@ pub(crate) enum TestServerError {
109109
/// The provided Url was not absolute and it needs to be.
110110
#[error("Path for URL `{}` was not absolute", .0)]
111111
NotAbsolute(LspUrl),
112+
#[error("Path is directory: `{0}`")]
113+
IsADirectory(LspUrl),
112114
}
113115

114116
struct TestServerContext {
@@ -207,9 +209,7 @@ impl LspContext for TestServerContext {
207209
let is_dir = self.dirs.read().unwrap().contains(&path);
208210
match (path.is_absolute(), is_dir) {
209211
(true, false) => Ok(self.file_contents.read().unwrap().get(&path).cloned()),
210-
(true, true) => {
211-
Err(std::io::Error::from(std::io::ErrorKind::IsADirectory).into())
212-
}
212+
(true, true) => Err(TestServerError::IsADirectory(uri.clone()).into()),
213213
(false, _) => Err(TestServerError::NotAbsolute(uri.clone()).into()),
214214
}
215215
}

0 commit comments

Comments
 (0)