mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-02 22:54:58 +00:00
Change docs and description to getter method
This commit is contained in:
parent
aacc894134
commit
e9848b2e6c
2 changed files with 11 additions and 4 deletions
|
@ -23,9 +23,8 @@ pub struct NavigationTarget {
|
|||
full_range: TextRange,
|
||||
focus_range: Option<TextRange>,
|
||||
container_name: Option<SmolStr>,
|
||||
|
||||
pub(crate) description: Option<String>,
|
||||
pub(crate) docs: Option<String>,
|
||||
description: Option<String>,
|
||||
docs: Option<String>,
|
||||
}
|
||||
|
||||
impl NavigationTarget {
|
||||
|
@ -55,6 +54,14 @@ impl NavigationTarget {
|
|||
self.full_range
|
||||
}
|
||||
|
||||
pub fn docs(&self) -> Option<String> {
|
||||
self.docs.clone()
|
||||
}
|
||||
|
||||
pub fn description(&self) -> Option<String> {
|
||||
self.description.clone()
|
||||
}
|
||||
|
||||
/// A "most interesting" range withing the `full_range`.
|
||||
///
|
||||
/// Typically, `full_range` is the whole syntax node,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue