From 32fe805c19dc2bcaf28c88c1c15ab79f08df1ce5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A9vin=20Commaille?= Date: Mon, 6 May 2024 17:43:39 +0200 Subject: [PATCH] secret: Remove unused error type --- src/secret/linux.rs | 22 +--------------------- 1 file changed, 1 insertion(+), 21 deletions(-) diff --git a/src/secret/linux.rs b/src/secret/linux.rs index 37b9dee3..2b7bbb76 100644 --- a/src/secret/linux.rs +++ b/src/secret/linux.rs @@ -1,12 +1,11 @@ //! Linux API to store the data of a session, using the Secret Service or Secret //! portal. -use std::{collections::HashMap, fs, path::PathBuf, string::FromUtf8Error}; +use std::{collections::HashMap, fs, path::PathBuf}; use gettextrs::gettext; use oo7::{Item, Keyring}; use ruma::{OwnedDeviceId, UserId}; -use serde_json::error::Error as JsonError; use thiserror::Error; use tracing::{debug, error, info}; use url::Url; @@ -386,25 +385,6 @@ pub enum LinuxSecretError { WrongProfile, } -/// A possible error value when converting a `Secret` from a UTF-8 byte vector. -#[derive(Debug)] -pub enum FromUtf8SecretError { - Str(FromUtf8Error), - Json(JsonError), -} - -impl From for FromUtf8SecretError { - fn from(err: FromUtf8Error) -> Self { - Self::Str(err) - } -} - -impl From for FromUtf8SecretError { - fn from(err: JsonError) -> Self { - Self::Json(err) - } -} - impl From for SecretError { fn from(value: oo7::Error) -> Self { Self::Service(value.to_user_facing())