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:
Aleksey Kladov 2021-07-06 00:00:39 +03:00
parent b8a6ea5ab5
commit 0db4f3f6a4
6 changed files with 91 additions and 60 deletions

View file

@ -46,8 +46,8 @@ pub struct AnnotationConfig {
pub(crate) fn annotations(
db: &RootDatabase,
config: &AnnotationConfig,
file_id: FileId,
config: AnnotationConfig,
) -> Vec<Annotation> {
let mut annotations = Vec::default();
@ -190,8 +190,7 @@ mod tests {
let annotations: Vec<Annotation> = analysis
.annotations(
file_id,
AnnotationConfig {
&AnnotationConfig {
binary_target: true,
annotate_runnables: true,
annotate_impls: true,
@ -200,6 +199,7 @@ mod tests {
run: true,
debug: true,
},
file_id,
)
.unwrap()
.into_iter()