code cleanup; listed invariants; enforce duration minutes invariant across edits; renamed notes to tasks everywhere

This commit is contained in:
aaron-jack-manning
2022-08-30 19:47:23 +10:00
parent 001cc3fa3d
commit f3e6e75a8a
14 changed files with 643 additions and 613 deletions

View File

@@ -1,4 +1,4 @@
use crate::colour;
use crate::format;
use std::io;
use std::fmt;
@@ -20,15 +20,15 @@ pub enum Error {
impl fmt::Display for Error {
fn fmt(&self, f : &mut fmt::Formatter<'_>) -> fmt::Result {
match self {
Error::Io(err) => write!(f, "{} {}", colour::text::error("Internal Error:"), err),
Error::Confy(err) => write!(f, "{} {}", colour::text::error("Internal Error:"), err),
Error::Trash(err) => write!(f, "{} {}", colour::text::error("Internal Error:"), err),
Error::TomlDe(err) => write!(f, "{} {}", colour::text::error("Internal Error:"), err),
Error::TomlSer(err) => write!(f, "{} {}", colour::text::error("Internal Error:"), err),
Error::Utf8(err) => write!(f, "{} {}", colour::text::error("Internal Error:"), err),
Error::Fmt(err) => write!(f, "{} {}", colour::text::error("Internal Error:"), err),
Error::Generic(message) => write!(f, "{} {}", colour::text::error("Error:"), message),
Error::Internal(message) => write!(f, "{} {}", colour::text::error("Internal Error:"), message),
Error::Io(err) => write!(f, "{} {}", format::error("Internal Error:"), err),
Error::Confy(err) => write!(f, "{} {}", format::error("Internal Error:"), err),
Error::Trash(err) => write!(f, "{} {}", format::error("Internal Error:"), err),
Error::TomlDe(err) => write!(f, "{} {}", format::error("Internal Error:"), err),
Error::TomlSer(err) => write!(f, "{} {}", format::error("Internal Error:"), err),
Error::Utf8(err) => write!(f, "{} {}", format::error("Internal Error:"), err),
Error::Fmt(err) => write!(f, "{} {}", format::error("Internal Error:"), err),
Error::Generic(message) => write!(f, "{} {}", format::error("Error:"), message),
Error::Internal(message) => write!(f, "{} {}", format::error("Internal Error:"), message),
}
}
}