Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- let mut slicedAllocated = unsafe {
- slice::from_raw_parts(allocated, quoteSize as usize)
- };
- let encoded_quote = encode(&slicedAllocated);
- The error I get:
- error[E0277]: the trait bound `[libc::c_void]: std::convert::AsRef<[u8]>` is not satisfied
- --> src/main.rs:260:29
- |
- 260 | let encoded_quote = encode(&slicedAllocated);
- | ^^^^^^ the trait `std::convert::AsRef<[u8]>` is not implemented for `[libc::c_void]`
- |
- = help: the following implementations were found:
- <[T; <unevaluated[]>] as std::convert::AsRef<[T]>>
- <[T; <unevaluated[]>] as std::convert::AsRef<[T]>>
- <[T; <unevaluated[]>] as std::convert::AsRef<[T]>>
- <[T; <unevaluated[]>] as std::convert::AsRef<[T]>>
- and 30 others
- = note: required because of the requirements on the impl of `std::convert::AsRef<[u8]>` for `&[libc::c_void]`
- = note: required by `base64::encode`
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement