Parse gutter-types as Strings (#5696)

This is necessary for configurations like:

    [editor]
    gutters = ["diagnostics", "line-numbers"]

after the toml 0.6.0 dependency update.
This commit is contained in:
Rino 2023-01-26 23:29:29 +01:00 committed by GitHub
parent 291f39d66b
commit 4d548a0ee3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -125,7 +125,7 @@ fn visit_seq<S>(self, mut seq: S) -> Result<Self::Value, S::Error>
S: serde::de::SeqAccess<'de>, S: serde::de::SeqAccess<'de>,
{ {
let mut gutters = Vec::new(); let mut gutters = Vec::new();
while let Some(gutter) = seq.next_element::<&str>()? { while let Some(gutter) = seq.next_element::<String>()? {
gutters.push( gutters.push(
gutter gutter
.parse::<GutterType>() .parse::<GutterType>()