From e9848b2e6ce96a52252c8797c6f467e8e6e951a4 Mon Sep 17 00:00:00 2001 From: Edwin Cheng Date: Mon, 10 Jun 2019 00:03:38 +0800 Subject: Change docs and description to getter method --- crates/ra_ide_api/src/display/navigation_target.rs | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'crates/ra_ide_api/src/display') diff --git a/crates/ra_ide_api/src/display/navigation_target.rs b/crates/ra_ide_api/src/display/navigation_target.rs index f60a07f1d..c0fa9439e 100644 --- a/crates/ra_ide_api/src/display/navigation_target.rs +++ b/crates/ra_ide_api/src/display/navigation_target.rs @@ -23,9 +23,8 @@ pub struct NavigationTarget { full_range: TextRange, focus_range: Option, container_name: Option, - - pub(crate) description: Option, - pub(crate) docs: Option, + description: Option, + docs: Option, } impl NavigationTarget { @@ -55,6 +54,14 @@ impl NavigationTarget { self.full_range } + pub fn docs(&self) -> Option { + self.docs.clone() + } + + pub fn description(&self) -> Option { + self.description.clone() + } + /// A "most interesting" range withing the `full_range`. /// /// Typically, `full_range` is the whole syntax node, -- cgit v1.2.3