mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-27 12:29:21 +00:00
refactor: Apply PR suggestions
This commit is contained in:
parent
743c037a34
commit
41943f2328
4 changed files with 49 additions and 70 deletions
|
@ -416,20 +416,11 @@ impl Analysis {
|
|||
|
||||
/// Returns a short text describing element at position.
|
||||
pub fn hover(
|
||||
&self,
|
||||
config: &HoverConfig,
|
||||
position: FilePosition,
|
||||
) -> Cancellable<Option<RangeInfo<HoverResult>>> {
|
||||
self.with_db(|db| hover::hover(db, position, config))
|
||||
}
|
||||
|
||||
/// Returns a short text displaying the type of the expression.
|
||||
pub fn hover_range(
|
||||
&self,
|
||||
config: &HoverConfig,
|
||||
range: FileRange,
|
||||
) -> Cancellable<Option<RangeInfo<HoverResult>>> {
|
||||
self.with_db(|db| hover::hover_range(db, range, config))
|
||||
self.with_db(|db| hover::hover(db, range, config))
|
||||
}
|
||||
|
||||
/// Return URL(s) for the documentation of the symbol under the cursor.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue