refactor(db): share update path so set_visibility avoids a redundant fetch; tie public-visibility const to the enum; test internal exclusion

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-06-02 13:35:36 +02:00
parent 14cdd2a04a
commit b948cae269
3 changed files with 55 additions and 21 deletions
+1 -1
View File
@@ -17,7 +17,7 @@ pub enum Visibility {
}
impl Visibility {
pub fn as_str(&self) -> &'static str {
pub const fn as_str(&self) -> &'static str {
match self {
Visibility::Draft => "draft",
Visibility::Internal => "internal",