Skip to content

Commit

Permalink
..
Browse files Browse the repository at this point in the history
  • Loading branch information
sxyazi committed Mar 4, 2024
1 parent 729bc7a commit 4019522
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 5 deletions.
3 changes: 0 additions & 3 deletions yazi-config/src/keymap/control.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,21 +52,18 @@ impl<'de> Deserialize<'de> for Control {
pub struct Shadow {
pub on: Vec<Key>,
pub run: Option<VecCmd>,
// TODO: remove this once Yazi 0.3 is released
pub exec: Option<VecCmd>,
pub desc: Option<String>,
}

let shadow = Shadow::deserialize(deserializer)?;

// TODO: remove this once Yazi 0.3 is released --
#[derive(Deserialize)]
struct VecCmd(#[serde(deserialize_with = "super::run_deserialize")] Vec<Cmd>);

let Some(run) = shadow.run.or(shadow.exec) else {
return Err(serde::de::Error::custom("missing field `run` within `[keymap]`"));
};
// TODO: -- remove this once Yazi 0.3 is released

Ok(Self { on: shadow.on, run: run.0, desc: shadow.desc })
}
Expand Down
2 changes: 0 additions & 2 deletions yazi-config/src/plugin/rule.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,12 @@ impl<'de> Deserialize<'de> for PluginRule {

let shadow = Shadow::deserialize(deserializer)?;

// TODO: -- remove this once Yazi 0.3 is released
#[derive(Deserialize)]
struct WrappedCmd(#[serde(deserialize_with = "super::run_deserialize")] Cmd);

let Some(run) = shadow.run.or(shadow.exec) else {
return Err(serde::de::Error::custom("missing field `run` within `[plugin]`"));
};
// TODO: remove this once Yazi 0.3 is released --

Ok(Self {
id: shadow.id,
Expand Down

0 comments on commit 4019522

Please sign in to comment.