misc sdk changes (#2934)

* misc sdk changes

* delete the store ☠️

* port comments

* fix build

* fix removing

* fix tests

* beta.20

---------

Co-authored-by: Matt Hill <mattnine@protonmail.com>
This commit is contained in:
Aiden McClelland
2025-05-09 15:10:51 -06:00
committed by GitHub
parent d2c4741f0b
commit 7750e33f82
62 changed files with 1255 additions and 2130 deletions

View File

@@ -80,11 +80,9 @@ impl std::fmt::Display for SshKeyResponse {
impl std::str::FromStr for SshPubKey {
type Err = Error;
fn from_str(s: &str) -> Result<Self, Self::Err> {
s.parse().map(|pk| SshPubKey(pk)).map_err(|e| Error {
source: e.into(),
kind: crate::ErrorKind::ParseSshKey,
revision: None,
})
s.parse()
.map(|pk| SshPubKey(pk))
.with_kind(ErrorKind::ParseSshKey)
}
}
@@ -171,11 +169,7 @@ pub async fn remove(
if keys_ref.remove(&fingerprint)?.is_some() {
keys_ref.de()
} else {
Err(Error {
source: color_eyre::eyre::eyre!("SSH Key Not Found"),
kind: crate::error::ErrorKind::NotFound,
revision: None,
})
Err(Error::new(eyre!("SSH Key Not Found"), ErrorKind::NotFound))
}
})
.await