mmal-sys
mmal-sys copied to clipboard
Rust 2021/analyser fix
Basic Rust 2021 compatibility.
In particular, this PR fixes the following error that appear under rust-analyzer:
error[E0308]: mismatched types
--> /workspaces/src/mmal-sys/src/lib.rs:290:35
|
290 | ::std::str::from_utf8(&self.camera_name).unwrap(),
| --------------------- ^^^^^^^^^^^^^^^^^ expected slice `[u8]`, found array `[i8; 16]`
| |
| arguments to this function are incorrect
|
= note: expected reference `&[u8]`
found reference `&[i8; 16]`
note: function defined here
--> /usr/local/rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/str/converts.rs:87:14
|
87 | pub const fn from_utf8(v: &[u8]) -> Result<&str, Utf8Error> {
| ^^^^^^^^^