From 58248e24cd45adcbfd7bfd00e1487df196b4a8c6 Mon Sep 17 00:00:00 2001 From: Steffen Lyngbaek Date: Wed, 11 Mar 2020 20:14:39 -0700 Subject: Switch from Vec to object with props - Instead of a single object type, use several individual nested types to allow toggling from the settings GUI - Remove unused struct definitions - Install and test that the toggles work --- crates/ra_project_model/src/lib.rs | 23 ----------------------- 1 file changed, 23 deletions(-) (limited to 'crates/ra_project_model') diff --git a/crates/ra_project_model/src/lib.rs b/crates/ra_project_model/src/lib.rs index 036c8719f..37845ca56 100644 --- a/crates/ra_project_model/src/lib.rs +++ b/crates/ra_project_model/src/lib.rs @@ -16,7 +16,6 @@ use anyhow::{bail, Context, Result}; use ra_cfg::CfgOptions; use ra_db::{CrateGraph, CrateName, Edition, Env, FileId}; use rustc_hash::FxHashMap; -use serde::Deserialize; use serde_json::from_reader; pub use crate::{ @@ -25,28 +24,6 @@ pub use crate::{ sysroot::Sysroot, }; -#[derive(Deserialize, Clone, Debug, PartialEq, Eq)] -#[serde(rename_all = "lowercase")] -pub enum InlayHintDisplayType { - Off, - TypeHints, - ParameterHints, - Full, -} - -#[derive(Deserialize, Clone, Debug, PartialEq, Eq)] -#[serde(rename_all = "camelCase", default)] -pub struct InlayHintOptions { - pub display_type: InlayHintDisplayType, - pub max_length: Option, -} - -impl Default for InlayHintOptions { - fn default() -> Self { - Self { display_type: InlayHintDisplayType::Full, max_length: None } - } -} - #[derive(Clone, PartialEq, Eq, Hash, Debug)] pub struct CargoTomlNotFoundError { pub searched_at: PathBuf, -- cgit v1.2.3