refactor(drive): match DriveKind directly instead of Drive::is_personal()

Drops the boolean is_personal() wrapper in favor of matching
DriveKind::Personal/Shared at the two call sites, matching the
exhaustive-match convention already used for DriveKind elsewhere
(as_str, parse, DriveKindDto::from).
This commit is contained in:
M.Schmidt
2026-07-13 19:51:40 +02:00
parent c07aeabd85
commit 8a405af5e1
3 changed files with 13 additions and 13 deletions
-6
View File
@@ -131,12 +131,6 @@ impl Drive {
self.default_for_user == Some(user_id)
}
/// `true` if this drive is a personal drive of any kind (default or
/// secondary). Encapsulates the kind check at the call site.
pub fn is_personal(&self) -> bool {
matches!(self.kind, DriveKind::Personal)
}
/// Typed view of `policies` for enforcement code. Lenient deserialise:
/// unknown keys are preserved on disk (the column stays the canonical
/// JSONB bag) but ignored here, missing keys default to `false`.