Skip to content

Commit

Permalink
refactor: don't deserialize &str from toml
Browse files Browse the repository at this point in the history
The new version of the `toml` crate is based on `toml_edit` and does
not support zero copy deserialization anymore. So we need to deserialize
`String` instead of `&str` in the keympa
  • Loading branch information
pascalkuthe authored and the-mikedavis committed Jan 24, 2023
1 parent 70887b7 commit e83ce72
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion helix-term/src/keymap.rs
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ impl<'de> serde::de::Visitor<'de> for KeyTrieVisitor {
S: serde::de::SeqAccess<'de>,
{
let mut commands = Vec::new();
while let Some(command) = seq.next_element::<&str>()? {
while let Some(command) = seq.next_element::<String>()? {
commands.push(
command
.parse::<MappableCommand>()
Expand Down

1 comment on commit e83ce72

@gibbz00
Copy link
Contributor

@gibbz00 gibbz00 commented on e83ce72 Jan 25, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pretty sure this fixes #5144 btw.

Please sign in to comment.