Skip to content

Commit

Permalink
derive: fix serde deserialization for Terminal
Browse files Browse the repository at this point in the history
  • Loading branch information
dr-orlovsky committed Apr 22, 2024
1 parent 68ca949 commit 6741b11
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions derive/src/derive.rs
Original file line number Diff line number Diff line change
Expand Up @@ -153,8 +153,8 @@ mod _serde {
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
where D: Deserializer<'de> {
if deserializer.is_human_readable() {
let s = <&str>::deserialize(deserializer)?;
Self::from_str(s).map_err(D::Error::custom)
let s = String::deserialize(deserializer)?;
Self::from_str(&s).map_err(D::Error::custom)
} else {
let d = <(Keychain, NormalIndex)>::deserialize(deserializer)?;
Ok(Self {
Expand Down

0 comments on commit 6741b11

Please sign in to comment.