- Add std::process::Stdio to imports in both test files - Update code to use imported Stdio instead of fully qualified paths - Verify compilation succeeds with cargo check Closes bf-3x4rp. Verification: notes/bf-3x4rp.md
1.6 KiB
1.6 KiB
Verification Note: bf-3x4rp - Standard Library Imports for Encryption Tests
Summary
Added missing std::process::Stdio import to encryption test files and updated code to use the imported type instead of fully qualified paths.
Changes Made
1. crates/pdftract-cli/tests/test_encryption_errors.rs
Added:
std::process::Stdioto the import statement (changed fromuse std::process::Command;touse std::process::{Command, Stdio};)
Updated:
- Line 126: Changed
std::process::Stdio::piped()toStdio::piped()(3 occurrences)
2. crates/pdftract-cli/tests/test_encryption_unsupported.rs
Added:
std::process::Stdioto the import statement (changed fromuse std::process::Command;touse std::process::{Command, Stdio};)
Updated:
- Line 73: Changed
std::process::Stdio::piped()toStdio::piped()(3 occurrences)
Import Coverage (per bead spec)
- ✅
std::error- Not needed for encryption tests - ✅
std::fs- Present intest_encryption_errors.rs(used infs::read()) - ✅
std::io- Not needed (Stdio is in std::process) - ✅
std::path- Present intest_encryption_errors.rs(used in helper functions) - ✅
std::process- Present in both files (Command + Stdio) - ✅
std::time- Not needed for encryption tests
Acceptance Criteria Status
✅ All necessary std imports present and organized ✅ No unused imports remain ✅ Files compile successfully after imports are finalized
Compilation Check
cargo check --package pdftract-cli --tests
# SUCCESS: No errors or warnings
References
- Parent bead: bf-2nl4x
- Plan line 258, Failure Mode Taxonomy: ENCRYPTION_UNSUPPORTED