fuckin' with shit

This commit is contained in:
Joe Ardent 2023-09-21 16:58:41 -07:00
parent cc14c30fcf
commit 14c36397d1
3 changed files with 228 additions and 207 deletions

420
Cargo.lock generated

File diff suppressed because it is too large Load Diff

View File

@ -41,7 +41,7 @@ impl IntoResponse for CreateUserError {
#[non_exhaustive]
pub enum CreateUserErrorKind {
AlreadyExists,
#[error(desc = "Usernames must be between 1 and 20 non-whitespace characters long")]
#[error(desc = "Usernames must be between 1 and 20 characters long")]
BadUsername,
PasswordMismatch,
#[error(desc = "Password must have at least 4 and at most 50 characters")]

View File

@ -100,8 +100,17 @@ pub struct WatchQuest {
pub already_watched: bool,
}
#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
pub struct QuestId {
pub user: Julid,
pub watch: Julid,
}
impl WatchQuest {
pub fn id(&self) -> (Julid, Julid) {
(self.user, self.watch)
pub fn id(&self) -> QuestId {
QuestId {
user: self.user,
watch: self.watch,
}
}
}