diff options
Diffstat (limited to 'crates/ra_ide_api/src')
-rw-r--r-- | crates/ra_ide_api/src/hover.rs | 2 | ||||
-rw-r--r-- | crates/ra_ide_api/src/mock_analysis.rs | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/crates/ra_ide_api/src/hover.rs b/crates/ra_ide_api/src/hover.rs index 1edeb7579..48f1f49c9 100644 --- a/crates/ra_ide_api/src/hover.rs +++ b/crates/ra_ide_api/src/hover.rs | |||
@@ -88,7 +88,7 @@ impl HoverResult { | |||
88 | fn hover_text(docs: Option<String>, desc: Option<String>) -> Option<String> { | 88 | fn hover_text(docs: Option<String>, desc: Option<String>) -> Option<String> { |
89 | match (desc, docs) { | 89 | match (desc, docs) { |
90 | (Some(desc), docs) => Some(rust_code_markup_with_doc(desc, docs)), | 90 | (Some(desc), docs) => Some(rust_code_markup_with_doc(desc, docs)), |
91 | (None, Some(docs)) => Some(docs.to_string()), | 91 | (None, Some(docs)) => Some(docs), |
92 | _ => None, | 92 | _ => None, |
93 | } | 93 | } |
94 | } | 94 | } |
diff --git a/crates/ra_ide_api/src/mock_analysis.rs b/crates/ra_ide_api/src/mock_analysis.rs index 4dbbd489a..132f6f875 100644 --- a/crates/ra_ide_api/src/mock_analysis.rs +++ b/crates/ra_ide_api/src/mock_analysis.rs | |||
@@ -62,13 +62,13 @@ impl MockAnalysis { | |||
62 | pub fn add_file_with_position(&mut self, path: &str, text: &str) -> FilePosition { | 62 | pub fn add_file_with_position(&mut self, path: &str, text: &str) -> FilePosition { |
63 | let (offset, text) = extract_offset(text); | 63 | let (offset, text) = extract_offset(text); |
64 | let file_id = FileId((self.files.len() + 1) as u32); | 64 | let file_id = FileId((self.files.len() + 1) as u32); |
65 | self.files.push((path.to_string(), text.to_string())); | 65 | self.files.push((path.to_string(), text)); |
66 | FilePosition { file_id, offset } | 66 | FilePosition { file_id, offset } |
67 | } | 67 | } |
68 | pub fn add_file_with_range(&mut self, path: &str, text: &str) -> FileRange { | 68 | pub fn add_file_with_range(&mut self, path: &str, text: &str) -> FileRange { |
69 | let (range, text) = extract_range(text); | 69 | let (range, text) = extract_range(text); |
70 | let file_id = FileId((self.files.len() + 1) as u32); | 70 | let file_id = FileId((self.files.len() + 1) as u32); |
71 | self.files.push((path.to_string(), text.to_string())); | 71 | self.files.push((path.to_string(), text)); |
72 | FileRange { file_id, range } | 72 | FileRange { file_id, range } |
73 | } | 73 | } |
74 | pub fn id_of(&self, path: &str) -> FileId { | 74 | pub fn id_of(&self, path: &str) -> FileId { |