diff options
author | Vika <vika@fireburn.ru> | 2025-01-30 08:49:22 +0300 |
---|---|---|
committer | Vika <vika@fireburn.ru> | 2025-01-30 08:49:22 +0300 |
commit | 62263e0e619625f2c5dd0b4364b43bd4fefc8ccd (patch) | |
tree | c796d7f78c2205dff77eacb02d43024a254c6d67 /libsecret/src/enums.rs | |
parent | 320de85d04061ccc3ce50fb9a460a28068f7146a (diff) | |
download | bowl-62263e0e619625f2c5dd0b4364b43bd4fefc8ccd.tar.zst |
libsecret: 0.6.0 (private fork) -> 0.7.0 (upstream)
libsecret is now maintained again! No need for a private fork.
Diffstat (limited to 'libsecret/src/enums.rs')
-rw-r--r-- | libsecret/src/enums.rs | 25 |
1 files changed, 0 insertions, 25 deletions
diff --git a/libsecret/src/enums.rs b/libsecret/src/enums.rs deleted file mode 100644 index 59de400..0000000 --- a/libsecret/src/enums.rs +++ /dev/null @@ -1,25 +0,0 @@ -use glib::error::ErrorDomain; -use glib::translate::*; - -use crate::Error; - -impl ErrorDomain for Error { - fn domain() -> glib::Quark { - unsafe { from_glib(ffi::secret_error_get_quark()) } - } - - fn code(self) -> i32 { - self.into_glib() - } - - fn from(code: i32) -> Option<Self> { - match code { - ffi::SECRET_ERROR_PROTOCOL => Some(Self::Protocol), - ffi::SECRET_ERROR_IS_LOCKED => Some(Self::IsLocked), - ffi::SECRET_ERROR_NO_SUCH_OBJECT => Some(Self::NoSuchObject), - ffi::SECRET_ERROR_ALREADY_EXISTS => Some(Self::AlreadyExists), - ffi::SECRET_ERROR_INVALID_FILE_FORMAT => Some(Self::InvalidFileFormat), - value => Some(Self::__Unknown(value)), - } - } -} |