refactor: Apply PR suggestions

This commit is contained in:
Alexander Gonzalez 2021-07-27 17:50:26 -04:00
parent 743c037a34
commit 41943f2328
4 changed files with 49 additions and 70 deletions

View file

@ -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.