From 725dab681f7db217cd3c5d5d546f152d61a3a2e4 Mon Sep 17 00:00:00 2001 From: ryneeverett Date: Sun, 15 Jan 2023 17:00:03 -0500 Subject: [PATCH] fixup --- taskchampion/taskchampion/src/errors.rs | 18 +++++++++--------- .../taskchampion/src/taskdb/snapshot.rs | 2 +- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/taskchampion/taskchampion/src/errors.rs b/taskchampion/taskchampion/src/errors.rs index 473f13487..21e44e33a 100644 --- a/taskchampion/taskchampion/src/errors.rs +++ b/taskchampion/taskchampion/src/errors.rs @@ -5,8 +5,8 @@ use thiserror::Error; #[non_exhaustive] /// Errors returned from taskchampion operations pub enum Error { - /// A crypto-related error - #[error("Crypto Error: {0}")] + /// A server-related error + #[error("Server Error: {0}")] Server(String), /// A task-database-related error #[error("Task Database Error: {0}")] @@ -17,7 +17,7 @@ pub enum Error { #[error("Local replica is out of sync with the server")] OutOfSync, /// A usage error - #[error("User Error: {0}")] + #[error("Usage Error: {0}")] Usage(String), /// A general error. #[error(transparent)] @@ -25,7 +25,7 @@ pub enum Error { } /// Convert private and third party errors into Error::Other. -macro_rules! convert_error { +macro_rules! other_error { ( $error:ty ) => { impl From<$error> for Error { fn from(err: $error) -> Self { @@ -34,10 +34,10 @@ macro_rules! convert_error { } }; } -convert_error!(ureq::Error); -convert_error!(io::Error); -convert_error!(serde_json::Error); -convert_error!(rusqlite::Error); -convert_error!(crate::storage::sqlite::SqliteError); +other_error!(ureq::Error); +other_error!(io::Error); +other_error!(serde_json::Error); +other_error!(rusqlite::Error); +other_error!(crate::storage::sqlite::SqliteError); pub type Result = std::result::Result; diff --git a/taskchampion/taskchampion/src/taskdb/snapshot.rs b/taskchampion/taskchampion/src/taskdb/snapshot.rs index 055ff9d89..3bff2eb2a 100644 --- a/taskchampion/taskchampion/src/taskdb/snapshot.rs +++ b/taskchampion/taskchampion/src/taskdb/snapshot.rs @@ -10,7 +10,7 @@ use uuid::Uuid; pub(super) struct SnapshotTasks(Vec<(Uuid, TaskMap)>); impl Serialize for SnapshotTasks { - fn serialize<'a, S>(&self, serializer: S) -> std::result::Result + fn serialize(&self, serializer: S) -> std::result::Result where S: Serializer, {