mirror of
https://github.com/storytold/pdfcraft.git
synced 2026-10-31 07:39:08 +00:00
Review: isolate_annotations says that an index off the page's list is an error
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
22c08fb65b
commit
f0cd96e90b
1 file changed
+2
@@ -231,6 +231,8 @@ pub fn isolate_annotation(doc: &mut Document, page: usize, index: usize) -> Resu
|
||||
|
||||
/// [`isolate_annotation`] for several annotations of one page: those of them with a normal
|
||||
/// appearance stay, in their order on the page. `false`, with `doc` unchanged, when none has one.
|
||||
/// An index that isn't one of the page's annotations is an error even when the others are, and
|
||||
/// leaves `doc` unchanged too.
|
||||
pub fn isolate_annotations(doc: &mut Document, page: usize, indices: &[usize]) -> Result<bool, AnnotError> {
|
||||
let p = page_ref(doc, page)?;
|
||||
let list = annots(doc, p);
|
||||
|
||||
Reference in new issue
Block a user