rust-embed
rust-embed copied to clipboard
RustEmbed indexing may panic error from clippy
Our project has strict rules on panic, and avoiding behavior which may panic. We are getting the following error when running cargo clippy on a file which uses RustEmbed:
. error: indexing may panic
. --> bin/src/service/docs/mod.rs:29:10
. |
. 29 | #[derive(RustEmbed)]
. | ^^^^^^^^^
. |
. = help: consider using `.get(n)` or `.get_mut(n)` instead
. = help: for further information visit
https://rust-lang.github.io/rust-clippy/master/index.html#indexing_slicing
. = note: requested on the command line with `-D clippy::indexing-slicing`
. = note: this error originates in the derive macro `RustEmbed`