fix(swap-layouts): properly identify plugin aliases (#3217)

This commit is contained in:
Aram Drevekenin 2024-03-22 17:01:17 +01:00 committed by GitHub
parent 6a3ecb1a3c
commit 5fb75ab6d1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -425,7 +425,7 @@ impl RunPlugin {
} }
} }
#[derive(Debug, Serialize, Deserialize, Clone, Hash, Default, PartialEq, Eq)] #[derive(Debug, Serialize, Deserialize, Clone, Hash, Default, Eq)]
pub struct PluginAlias { pub struct PluginAlias {
pub name: String, pub name: String,
pub configuration: Option<PluginUserConfiguration>, pub configuration: Option<PluginUserConfiguration>,
@ -433,6 +433,14 @@ pub struct PluginAlias {
pub run_plugin: Option<RunPlugin>, pub run_plugin: Option<RunPlugin>,
} }
impl PartialEq for PluginAlias {
fn eq(&self, other: &Self) -> bool {
self.name == other.name
&& self.configuration == other.configuration
&& self.initial_cwd == other.initial_cwd
}
}
impl PluginAlias { impl PluginAlias {
pub fn new( pub fn new(
name: &str, name: &str,