INNER CODE UNIT · Rust

Err

edwardkim/rhwp · bindings/Native/src/lib.rs:194

    if let Err(error) = output.write_all(&pdf) {
        drop(output);
        let _ = fs::remove_file(output_file);
        return Err(format!(
            "PDF write failed - {}: {}",
            output_file.display(),
            error
        ));
    }
    Ok(success_json(page_count, &[output_file.to_path_buf()], None))
}

fn export_text_to_dir(
    input_path: &Path,
    output_dir: &Path,
    target_page: Option<u32>,
) -> Result<String, String> {
    let data = fs::read(input_path)

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…