diff --git a/src/domain/appointment_slot.rs b/src/domain/appointment_slot.rs
index 5dcad37..76ddcfc 100644
--- a/src/domain/appointment_slot.rs
+++ b/src/domain/appointment_slot.rs
@@ -565,17 +565,23 @@ mod tests {
Err(AppError::ConflictOwned(_))
));
// Touching at the boundary (ends where the next starts) → allowed.
- assert!(AppointmentSlot::create(&teacher, at(2_000), at(3_000), None, &db)
- .await
- .is_ok());
- assert!(AppointmentSlot::create(&teacher, at(0), at(1_000), None, &db)
- .await
- .is_ok());
+ assert!(
+ AppointmentSlot::create(&teacher, at(2_000), at(3_000), None, &db)
+ .await
+ .is_ok()
+ );
+ assert!(
+ AppointmentSlot::create(&teacher, at(0), at(1_000), None, &db)
+ .await
+ .is_ok()
+ );
// A different teacher sharing the same window is fine.
let other = UserId::from_key("t2");
- assert!(AppointmentSlot::create(&other, at(1_000), at(2_000), None, &db)
- .await
- .is_ok());
+ assert!(
+ AppointmentSlot::create(&other, at(1_000), at(2_000), None, &db)
+ .await
+ .is_ok()
+ );
}
#[tokio::test]
@@ -636,9 +642,11 @@ mod tests {
.await,
Err(AppError::ConflictOwned(_))
));
- assert!(AppointmentSlot::list_for_teacher(&teacher, &db)
- .await
- .unwrap()
- .is_empty());
+ assert!(
+ AppointmentSlot::list_for_teacher(&teacher, &db)
+ .await
+ .unwrap()
+ .is_empty()
+ );
}
}
diff --git a/src/domain/bank_question.rs b/src/domain/bank_question.rs
index 6493ed5..c0221af 100644
--- a/src/domain/bank_question.rs
+++ b/src/domain/bank_question.rs
@@ -191,7 +191,11 @@ impl BankQuestion {
/// hold — and a round-trip through `try_new` would mint *new* choice ids,
/// detaching the copy's `correct` and option pictures from its choices.
pub fn spec(&self) -> QuestionSpec {
- QuestionSpec::from_stored(self.kind.clone(), self.choices.clone(), self.correct.clone())
+ QuestionSpec::from_stored(
+ self.kind.clone(),
+ self.choices.clone(),
+ self.correct.clone(),
+ )
}
pub async fn create(
@@ -248,7 +252,10 @@ impl BankQuestion {
created.ok_or_else(|| AppError::Internal("failed to create bank question".into()))
}
- pub async fn read(id: &BankQuestionId, db: &Database) -> Result