diff options
| author | Ali Bektas <bektasali@protonmail.com> | 2024-07-21 22:49:05 +0200 |
|---|---|---|
| committer | Ali Bektas <bektasali@protonmail.com> | 2024-07-22 01:33:15 +0200 |
| commit | 65627d1c547124741ffc8f194332fd5a74e83f38 (patch) | |
| tree | a87760f818deedcfb41afb488935d6f3821e4356 | |
| parent | ad4e35a04861cd977701844d9f586bad29c9b0d8 (diff) | |
Apply changes to ratoml/fixes
| -rw-r--r-- | src/tools/rust-analyzer/crates/rust-analyzer/src/config.rs | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/src/tools/rust-analyzer/crates/rust-analyzer/src/config.rs b/src/tools/rust-analyzer/crates/rust-analyzer/src/config.rs index 159098d120c..00b4d185c05 100644 --- a/src/tools/rust-analyzer/crates/rust-analyzer/src/config.rs +++ b/src/tools/rust-analyzer/crates/rust-analyzer/src/config.rs @@ -892,7 +892,6 @@ impl Config { SnippetScopeDef::Type => SnippetScope::Type, SnippetScopeDef::Item => SnippetScope::Item, }; - #[allow(clippy::single_match)] match Snippet::new( &def.prefix, &def.postfix, @@ -2833,7 +2832,7 @@ fn get_field<T: DeserializeOwned>( }) } -fn get_field_toml<T: DeserializeOwned>( +fn get_field_toml<T: DeserializeOwned + fmt::Debug>( toml: &toml::Table, error_sink: &mut Vec<(String, toml::de::Error)>, field: &'static str, @@ -2847,12 +2846,17 @@ fn get_field_toml<T: DeserializeOwned>( .filter_map(move |field| { let mut pointer = field.replace('_', "/"); pointer.insert(0, '/'); - toml_pointer(toml, &pointer) - .map(|it| <_>::deserialize(it.clone()).map_err(|e| (e, pointer))) + toml_pointer(toml, &pointer).map(|it| { + dbg!(&pointer, std::any::type_name::<T>()); + <_>::deserialize(it.clone()).map_err(|e| (e, pointer)) + }) }) .find(Result::is_ok) .and_then(|res| match res { - Ok(it) => Some(it), + Ok(it) => { + dbg!(&it); + Some(it) + } Err((e, pointer)) => { tracing::warn!("Failed to deserialize config field at {}: {:?}", pointer, e); error_sink.push((pointer, e)); |
