fuckin' with shit
This commit is contained in:
parent
cc14c30fcf
commit
14c36397d1
3 changed files with 228 additions and 207 deletions
420
Cargo.lock
generated
420
Cargo.lock
generated
File diff suppressed because it is too large
Load diff
|
@ -41,7 +41,7 @@ impl IntoResponse for CreateUserError {
|
||||||
#[non_exhaustive]
|
#[non_exhaustive]
|
||||||
pub enum CreateUserErrorKind {
|
pub enum CreateUserErrorKind {
|
||||||
AlreadyExists,
|
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,
|
BadUsername,
|
||||||
PasswordMismatch,
|
PasswordMismatch,
|
||||||
#[error(desc = "Password must have at least 4 and at most 50 characters")]
|
#[error(desc = "Password must have at least 4 and at most 50 characters")]
|
||||||
|
|
|
@ -100,8 +100,17 @@ pub struct WatchQuest {
|
||||||
pub already_watched: bool,
|
pub already_watched: bool,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
|
||||||
|
pub struct QuestId {
|
||||||
|
pub user: Julid,
|
||||||
|
pub watch: Julid,
|
||||||
|
}
|
||||||
|
|
||||||
impl WatchQuest {
|
impl WatchQuest {
|
||||||
pub fn id(&self) -> (Julid, Julid) {
|
pub fn id(&self) -> QuestId {
|
||||||
(self.user, self.watch)
|
QuestId {
|
||||||
|
user: self.user,
|
||||||
|
watch: self.watch,
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue