fix: typo of the deprecated version and roll it over to the next version

This commit is contained in:
sxyazi 2023-10-22 10:01:30 +08:00
parent dbd36b0d23
commit df4b502808
No known key found for this signature in database

View File

@ -51,17 +51,17 @@ impl<'de> Deserialize<'de> for Opener {
return Err(serde::de::Error::custom("`exec` cannot be empty"));
}
// TODO: remove this when v1.0.5 is released --
// TODO: remove this when v0.1.6 is released --
if shadow.display_name.is_some() {
println!(
"WARNING: `display_name` is deprecated and will be removed in Yazi v1.0.6. Use `desc` instead.\ne.g. {}\n\n",
"WARNING: `display_name` is deprecated and will be removed in Yazi v0.1.7. Use `desc` instead.\ne.g. {}\n\n",
r#"{ exec = 'nvim "$@"', display_name = "Edit" } ==> { exec = 'nvim "$@"', desc = "Edit" }"#
);
}
if shadow.display_name.is_some() && shadow.desc.is_none() {
shadow.desc = shadow.display_name.clone();
}
// TODO: -- remove this when v1.0.5 is released
// TODO: -- remove this when v0.1.6 is released
let desc =
shadow.desc.unwrap_or_else(|| shadow.exec.split_whitespace().next().unwrap().to_string());