aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir/src/docs.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_hir/src/docs.rs')
-rw-r--r--crates/ra_hir/src/docs.rs10
1 files changed, 5 insertions, 5 deletions
diff --git a/crates/ra_hir/src/docs.rs b/crates/ra_hir/src/docs.rs
index c2279fe95..38c0922eb 100644
--- a/crates/ra_hir/src/docs.rs
+++ b/crates/ra_hir/src/docs.rs
@@ -1,24 +1,24 @@
1use ra_syntax::ast; 1use ra_syntax::ast;
2 2
3use crate::{HirDatabase, Module, StructField, Struct, Enum, EnumVariant, Static, Const, Function, Union}; 3use crate::{HirDatabase, Module, StructField, Struct, Enum, EnumVariant, Static, Const, Function, Union, Trait, TypeAlias, FieldSource};
4 4
5/// Holds documentation 5/// Holds documentation
6#[derive(Debug, Clone)] 6#[derive(Debug, Clone)]
7pub struct Documentation(String); 7pub struct Documentation(String);
8 8
9impl Documentation { 9impl Documentation {
10 pub fn new(s: &str) -> Self { 10 fn new(s: &str) -> Documentation {
11 Self(s.into()) 11 Documentation(s.into())
12 } 12 }
13 13
14 pub fn contents(&self) -> &str { 14 pub fn as_str(&self) -> &str {
15 &self.0 15 &self.0
16 } 16 }
17} 17}
18 18
19impl Into<String> for Documentation { 19impl Into<String> for Documentation {
20 fn into(self) -> String { 20 fn into(self) -> String {
21 self.contents().into() 21 self.0.clone()
22 } 22 }
23} 23}
24 24