Skip to content

Update libcoap to 4.3.5, bump dependencies, improve linking (incl. ESP32) #71

Update libcoap to 4.3.5, bump dependencies, improve linking (incl. ESP32)

Update libcoap to 4.3.5, bump dependencies, improve linking (incl. ESP32) #71

GitHub Actions / clippy (libcoap-sys) completed Jun 13, 2024 in 1s

reviewdog [clippy (libcoap-sys)] report

reported by reviewdog 🐶

Findings (2)

libcoap-sys/build.rs|48 col 28| error[E0433]: failed to resolve: use of undeclared crate or module embuild
--> libcoap-sys/build.rs:48:28
|
48 | let esp_include_path = embuild::build::CInclArgs::try_from_env("ESP_IDF").unwrap();
| ^^^^^^^ use of undeclared crate or module embuild
libcoap-sys/build.rs|53 col 75| error[E0277]: a value of type std::vec::Vec<std::string::String> cannot be built from an iterator over elements of type std::borrow::Cow<'_, str>
--> libcoap-sys/build.rs:53:75
|
53 | ).map(|x| apostrophe_remover.replace(x.trim(), "$content")).collect::<Vec>();
| ------- ^^^^^^^^^^^ value of type std::vec::Vec<std::string::String> cannot be built from std::iter::Iterator<Item=std::borrow::Cow<'_, str>>
| |
| required by a bound introduced by this call
|
= help: the trait std::iter::FromIterator<std::borrow::Cow<'_, str>> is not implemented for std::vec::Vec<std::string::String>
= help: the trait std::iter::FromIterator<std::string::String> is implemented for std::vec::Vec<std::string::String>
= help: for that trait implementation, expected std::string::String, found std::borrow::Cow<'_, str>
note: the method call chain might not have had the expected associated types
--> libcoap-sys/build.rs:53:7
|
49 | let arg_splitter = regex::Regex::new(r##"(?:[^\\]"[^"][^\\]")?(\s)"##).unwrap();
| ---------------------------------------------------- this expression has type Result<Regex, Error>
50 | let apostrophe_remover = regex::Regex::new(r##"^"(?.
)"$"##).unwrap();
51 | let esp_clang_args = arg_splitter.split(
| __________________________________-
52 | | esp_include_path.args.as_str()
53 | | ).map(|x| apostrophe_remover.replace(x.trim(), "$content")).collect::<Vec>();
| | - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Iterator::Item changed to Cow<'_, str> here
| |
|
| Iterator::Item is &str here
note: required by a bound in std::iter::Iterator::collect
--> /rustc/129f3b9964af4d4a709d1383930ade12dfe7c081/library/core/src/iter/traits/iterator.rs:2000:5

Filtered Findings (1)

libcoap-sys/build.rs|386 col 77| warning: use of deprecated constant bindgen::CargoCallbacks: Use CargoCallbacks::new() instead. Please, check the documentation for further information.
--> libcoap-sys/build.rs:386:77
|
386 | bindgen_builder = bindgen_builder.parse_callbacks(Box::new(bindgen::CargoCallbacks));
| ^^^^^^^^^^^^^^
|
= note: #[warn(deprecated)] on by default

Annotations

Check failure on line 48 in libcoap-sys/build.rs

See this annotation in the file changed.

@github-actions github-actions / clippy (libcoap-sys)

[clippy (libcoap-sys)] libcoap-sys/build.rs#L48

error[E0433]: failed to resolve: use of undeclared crate or module `embuild`
  --> libcoap-sys/build.rs:48:28
   |
48 |     let esp_include_path = embuild::build::CInclArgs::try_from_env("ESP_IDF").unwrap();
   |                            ^^^^^^^ use of undeclared crate or module `embuild`
Raw output
libcoap-sys/build.rs:48:28:e:error[E0433]: failed to resolve: use of undeclared crate or module `embuild`
  --> libcoap-sys/build.rs:48:28
   |
48 |     let esp_include_path = embuild::build::CInclArgs::try_from_env("ESP_IDF").unwrap();
   |                            ^^^^^^^ use of undeclared crate or module `embuild`


__END__

Check failure on line 53 in libcoap-sys/build.rs

See this annotation in the file changed.

@github-actions github-actions / clippy (libcoap-sys)

[clippy (libcoap-sys)] libcoap-sys/build.rs#L53

error[E0277]: a value of type `std::vec::Vec<std::string::String>` cannot be built from an iterator over elements of type `std::borrow::Cow<'_, str>`
  --> libcoap-sys/build.rs:53:75
   |
53 |     ).map(|x| apostrophe_remover.replace(x.trim(), "$content")).collect::<Vec<String>>();
   |                                                                 -------   ^^^^^^^^^^^ value of type `std::vec::Vec<std::string::String>` cannot be built from `std::iter::Iterator<Item=std::borrow::Cow<'_, str>>`
   |                                                                 |
   |                                                                 required by a bound introduced by this call
   |
   = help: the trait `std::iter::FromIterator<std::borrow::Cow<'_, str>>` is not implemented for `std::vec::Vec<std::string::String>`
   = help: the trait `std::iter::FromIterator<std::string::String>` is implemented for `std::vec::Vec<std::string::String>`
   = help: for that trait implementation, expected `std::string::String`, found `std::borrow::Cow<'_, str>`
note: the method call chain might not have had the expected associated types
  --> libcoap-sys/build.rs:53:7
   |
49 |       let arg_splitter = regex::Regex::new(r##"(?:[^\\]"[^"]*[^\\]")?(\s)"##).unwrap();
   |                          ---------------------------------------------------- this expression has type `Result<Regex, Error>`
50 |       let apostrophe_remover = regex::Regex::new(r##"^"(?<content>.*)"$"##).unwrap();
51 |       let esp_clang_args = arg_splitter.split(
   |  _______________________________________-
52 | |         esp_include_path.args.as_str()
53 | |     ).map(|x| apostrophe_remover.replace(x.trim(), "$content")).collect::<Vec<String>>();
   | |     - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `Iterator::Item` changed to `Cow<'_, str>` here
   | |_____|
   |       `Iterator::Item` is `&str` here
note: required by a bound in `std::iter::Iterator::collect`
  --> /rustc/129f3b9964af4d4a709d1383930ade12dfe7c081/library/core/src/iter/traits/iterator.rs:2000:5
Raw output
libcoap-sys/build.rs:53:75:e:error[E0277]: a value of type `std::vec::Vec<std::string::String>` cannot be built from an iterator over elements of type `std::borrow::Cow<'_, str>`
  --> libcoap-sys/build.rs:53:75
   |
53 |     ).map(|x| apostrophe_remover.replace(x.trim(), "$content")).collect::<Vec<String>>();
   |                                                                 -------   ^^^^^^^^^^^ value of type `std::vec::Vec<std::string::String>` cannot be built from `std::iter::Iterator<Item=std::borrow::Cow<'_, str>>`
   |                                                                 |
   |                                                                 required by a bound introduced by this call
   |
   = help: the trait `std::iter::FromIterator<std::borrow::Cow<'_, str>>` is not implemented for `std::vec::Vec<std::string::String>`
   = help: the trait `std::iter::FromIterator<std::string::String>` is implemented for `std::vec::Vec<std::string::String>`
   = help: for that trait implementation, expected `std::string::String`, found `std::borrow::Cow<'_, str>`
note: the method call chain might not have had the expected associated types
  --> libcoap-sys/build.rs:53:7
   |
49 |       let arg_splitter = regex::Regex::new(r##"(?:[^\\]"[^"]*[^\\]")?(\s)"##).unwrap();
   |                          ---------------------------------------------------- this expression has type `Result<Regex, Error>`
50 |       let apostrophe_remover = regex::Regex::new(r##"^"(?<content>.*)"$"##).unwrap();
51 |       let esp_clang_args = arg_splitter.split(
   |  _______________________________________-
52 | |         esp_include_path.args.as_str()
53 | |     ).map(|x| apostrophe_remover.replace(x.trim(), "$content")).collect::<Vec<String>>();
   | |     - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `Iterator::Item` changed to `Cow<'_, str>` here
   | |_____|
   |       `Iterator::Item` is `&str` here
note: required by a bound in `std::iter::Iterator::collect`
  --> /rustc/129f3b9964af4d4a709d1383930ade12dfe7c081/library/core/src/iter/traits/iterator.rs:2000:5


__END__