Fix duplicate SshProject's in Remote Projects menu (#20271)
Closes #20269 Release Notes: - Changes SshConnection to use a BTreeSet of SshProject's instead of a Vec of SshProject's in order to remove duplicate remote projects from "settings.json" and the Remote Projects menu.
This commit is contained in:
parent
38b1940251
commit
c10c35ffda
2 changed files with 19 additions and 10 deletions
|
@ -1,3 +1,4 @@
|
|||
use std::collections::BTreeSet;
|
||||
use std::{path::PathBuf, sync::Arc, time::Duration};
|
||||
|
||||
use anyhow::{anyhow, Result};
|
||||
|
@ -75,7 +76,7 @@ pub struct SshConnection {
|
|||
#[serde(default)]
|
||||
pub args: Vec<String>,
|
||||
#[serde(default)]
|
||||
pub projects: Vec<SshProject>,
|
||||
pub projects: BTreeSet<SshProject>,
|
||||
/// Name to use for this server in UI.
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub nickname: Option<String>,
|
||||
|
@ -101,7 +102,7 @@ impl From<SshConnection> for SshConnectionOptions {
|
|||
}
|
||||
}
|
||||
|
||||
#[derive(Clone, Default, Serialize, PartialEq, Deserialize, JsonSchema)]
|
||||
#[derive(Clone, Default, Serialize, PartialEq, Eq, PartialOrd, Ord, Deserialize, JsonSchema)]
|
||||
pub struct SshProject {
|
||||
pub paths: Vec<String>,
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue