While compiling a rust based project which uses openssl-sys
depedency -> got an error ->
error[E0277]: the trait bound `[PathBuf]: AsRef<Path>` is not satisfied
--> /home/divyanshgupta/.cargo/registry/src/index.crates.io-6f17d22bba15001f/openssl-sys-0.9.84/build/run_bindgen.rs:192:18
|
192 | .include(include_dirs)
| ------- ^^^^^^^^^^^^ the trait `AsRef<Path>` is not implemented for `[PathBuf]`, which is required by `&[PathBuf]: AsRef<Path>`
| |
| required by a bound introduced by this call
|
= help: the following other types implement trait `AsRef<T>`:
[T; N]
[T]
= note: required for `&[PathBuf]` to implement `AsRef<Path>`
note: required by a bound in `Build::include`
--> /home/divyanshgupta/.cargo/registry/src/index.crates.io-6f17d22bba15001f/cc-1.0.41/src/lib.rs:323:23
|
323 | pub fn include<P: AsRef<Path>>(&mut self, dir: P) -> &mut Build {
| ^^^^^^^^^^^ required by this bound in `Build::include`
For more information about this error, try `rustc --explain E0277`.
error: could not compile `openssl-sys` (build script) due to 1 previous error
please tell how to solve this.