From 4e6a3db72e18d3a6fe8136dad8644acdfda4ef7b Mon Sep 17 00:00:00 2001 From: mtlcl410 <2368091+mtlcl410@users.noreply.github.com> Date: Fri, 23 Oct 2026 19:49:11 +0800 Subject: [PATCH] M5: set_locked keeps its own doc comment; set_popup's starts its own (#2137) set_popup had been added between set_locked's doc comment and the function, so rustdoc gave set_popup the lock text and set_locked none. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_0175FWj4xFhMhSH3UpMU8DSC --- crates/annot/src/lib.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/annot/src/lib.rs b/crates/annot/src/lib.rs index 8e5901710c..dddeabdcaf 100644 --- a/crates/annot/src/lib.rs +++ b/crates/annot/src/lib.rs @@ -1844,8 +1844,6 @@ fn unlocked(doc: &Document, r: ObjRef) -> Result<(), AnnotError> { if flags(doc, r) & FLAG_LOCKED != 0 { Err(AnnotError::Invalid("the comment is locked".into())) } else { Ok(()) } } -/// Lock or unlock a comment (the Locked flag). A locked comment can't be moved, resized, -/// restyled or deleted; its text and replies stay editable, as in Acrobat. /// Open, close or move a comment's pop-up window (Acrobat: double-click a comment to open it, /// drag its title bar to move it). `rect` is the pop-up's new `/Rect` in user space; `open` its /// `/Open`. A comment without a `/Popup` gets one, placed to the right of the comment as new @@ -1917,6 +1915,8 @@ pub fn set_popup(doc: &mut Document, page: usize, index: usize, rect: Option<[f6 Ok(()) } +/// Lock or unlock a comment (the Locked flag). A locked comment can't be moved, resized, +/// restyled or deleted; its text and replies stay editable, as in Acrobat. pub fn set_locked(doc: &mut Document, page: usize, index: usize, locked: bool) -> Result<(), AnnotError> { let (_, r) = annot_ref(doc, page, index)?; let f = if locked { flags(doc, r) | FLAG_LOCKED } else { flags(doc, r) & !FLAG_LOCKED };