diff options
Diffstat (limited to 'crates/ra_db/src/input.rs')
-rw-r--r-- | crates/ra_db/src/input.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/crates/ra_db/src/input.rs b/crates/ra_db/src/input.rs index eafa95921..60f7dc881 100644 --- a/crates/ra_db/src/input.rs +++ b/crates/ra_db/src/input.rs | |||
@@ -6,13 +6,14 @@ | |||
6 | //! actual IO. See `vfs` and `project_model` in the `ra_lsp_server` crate for how | 6 | //! actual IO. See `vfs` and `project_model` in the `ra_lsp_server` crate for how |
7 | //! actual IO is done and lowered to input. | 7 | //! actual IO is done and lowered to input. |
8 | 8 | ||
9 | use relative_path::{RelativePath, RelativePathBuf}; | ||
10 | use rustc_hash::FxHashMap; | 9 | use rustc_hash::FxHashMap; |
11 | 10 | ||
12 | use ra_cfg::CfgOptions; | 11 | use ra_cfg::CfgOptions; |
13 | use ra_syntax::SmolStr; | 12 | use ra_syntax::SmolStr; |
14 | use rustc_hash::FxHashSet; | 13 | use rustc_hash::FxHashSet; |
15 | 14 | ||
15 | use crate::{RelativePath, RelativePathBuf}; | ||
16 | |||
16 | /// `FileId` is an integer which uniquely identifies a file. File paths are | 17 | /// `FileId` is an integer which uniquely identifies a file. File paths are |
17 | /// messy and system-dependent, so most of the code should work directly with | 18 | /// messy and system-dependent, so most of the code should work directly with |
18 | /// `FileId`, without inspecting the path. The mapping between `FileId` and path | 19 | /// `FileId`, without inspecting the path. The mapping between `FileId` and path |
@@ -97,6 +98,7 @@ pub enum Edition { | |||
97 | } | 98 | } |
98 | 99 | ||
99 | impl Edition { | 100 | impl Edition { |
101 | //FIXME: replace with FromStr with proper error handling | ||
100 | pub fn from_string(s: &str) -> Edition { | 102 | pub fn from_string(s: &str) -> Edition { |
101 | match s { | 103 | match s { |
102 | "2015" => Edition::Edition2015, | 104 | "2015" => Edition::Edition2015, |