ITADN

compile error

#93Closedruierzhao 创建于 2025-09-01
R
ruierzhaocommented
when I compile printpdf and lopdf , I get this: error[E0277]: the trait bound `Arc<Vec<u8>>: AsRef<[u8]>` is not satisfied --> D:\dev\rust\cargo\registry\src\index.crates.io-1949cf8c6b5b557f\svg2pdf-0.13.0\src\render\image.rs:30:45 | 30 | image::load_from_memory_with_format(content, format).map_err(|_| InvalidImage) | ----------------------------------- ^^^^^^^ the trait `AsRef<[u8]>` is not implemented for `Arc<Vec<u8>>` | | | required by a bound introduced by this call | = help: the trait `AsRef<[u8]>` is not implemented for `Arc<Vec<u8>>` but trait `AsRef<Vec<u8>>` is implemented for it = help: for that trait implementation, expected `Vec<u8>`, found `[u8]` = note: required for `&Arc<Vec<u8>>` to implement `AsRef<[u8]>` my environment: installed toolchains -------------------- stable-x86_64-pc-windows-msvc (active, default) nightly-x86_64-pc-windows-msvc active toolchain ---------------- name: stable-x86_64-pc-windows-msvc active because: it's the default toolchain installed targets: wasm32-unknown-unknown x86_64-pc-windows-msvc and compiler versions: $ rustc --version rustc 1.88.0 (6b00bc388 2025-06-23) $ cargo --version cargo 1.88.0 (873a06493 2025-05-10)
关闭于 2025-09-10 12 条评论