Address Issues from Github

- Updated naming of config
- Define struct in ra_ide and use remote derive in rust-analyzer/config
- Make inlayConfig type more flexible to support more future types
- Remove constructor only used in tests
This commit is contained in:
Steffen Lyngbaek 2020-03-10 11:21:56 -07:00
parent e98aff109a
commit cfb48df149
10 changed files with 77 additions and 45 deletions

View file

@ -44,7 +44,6 @@ mod marks;
#[cfg(test)]
mod test_utils;
use ra_project_model::InlayHintOptions;
use std::sync::Arc;
use ra_cfg::CfgOptions;
@ -69,7 +68,7 @@ pub use crate::{
expand_macro::ExpandedMacro,
folding_ranges::{Fold, FoldKind},
hover::HoverResult,
inlay_hints::{InlayHint, InlayKind},
inlay_hints::{InlayConfig, InlayHint, InlayKind},
references::{Declaration, Reference, ReferenceAccess, ReferenceKind, ReferenceSearchResult},
runnables::{Runnable, RunnableKind, TestId},
source_change::{FileSystemEdit, SourceChange, SourceFileEdit},
@ -319,7 +318,7 @@ impl Analysis {
pub fn inlay_hints(
&self,
file_id: FileId,
inlay_hint_opts: &InlayHintOptions,
inlay_hint_opts: &InlayConfig,
) -> Cancelable<Vec<InlayHint>> {
self.with_db(|db| inlay_hints::inlay_hints(db, file_id, inlay_hint_opts))
}