mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 04:44:57 +00:00
internal: ensure consistent passing for config params
We pass "context" parametes first, so configs should be on the left. "Bigger" context wins, so configs goes after db.
This commit is contained in:
parent
b8a6ea5ab5
commit
0db4f3f6a4
6 changed files with 91 additions and 60 deletions
|
@ -347,8 +347,8 @@ impl Analysis {
|
|||
/// Returns a list of the places in the file where type hints can be displayed.
|
||||
pub fn inlay_hints(
|
||||
&self,
|
||||
file_id: FileId,
|
||||
config: &InlayHintsConfig,
|
||||
file_id: FileId,
|
||||
) -> Cancellable<Vec<InlayHint>> {
|
||||
self.with_db(|db| inlay_hints::inlay_hints(db, file_id, config))
|
||||
}
|
||||
|
@ -417,8 +417,8 @@ impl Analysis {
|
|||
/// Returns a short text describing element at position.
|
||||
pub fn hover(
|
||||
&self,
|
||||
position: FilePosition,
|
||||
config: &HoverConfig,
|
||||
position: FilePosition,
|
||||
) -> Cancellable<Option<RangeInfo<HoverResult>>> {
|
||||
self.with_db(|db| hover::hover(db, position, config))
|
||||
}
|
||||
|
@ -649,10 +649,10 @@ impl Analysis {
|
|||
|
||||
pub fn annotations(
|
||||
&self,
|
||||
config: &AnnotationConfig,
|
||||
file_id: FileId,
|
||||
config: AnnotationConfig,
|
||||
) -> Cancellable<Vec<Annotation>> {
|
||||
self.with_db(|db| annotations::annotations(db, file_id, config))
|
||||
self.with_db(|db| annotations::annotations(db, config, file_id))
|
||||
}
|
||||
|
||||
pub fn resolve_annotation(&self, annotation: Annotation) -> Cancellable<Annotation> {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue