Open frewsxcv opened 2 years ago
Also happens with https://api.crossref.org/swagger-docs.
Compiling crossref-api v1.0.0 (crossref-api)
error[E0283]: type annotations needed
--> crossref-api/src/apis/journals_api.rs:90:114
|
90 | let local_var_uri_str = format!("{}/journals/{issn}", local_var_configuration.base_path, issn=issn.join(",").as_ref());
| ^^^^^^
|
= note: multiple `impl`s satisfying `std::string::String: AsRef<_>` found in the following crates: `alloc`, `std`:
- impl AsRef<OsStr> for std::string::String;
- impl AsRef<Path> for std::string::String;
- impl AsRef<[u8]> for std::string::String;
- impl AsRef<str> for std::string::String;
help: try using a fully qualified path to specify the expected types
|
90 | let local_var_uri_str = format!("{}/journals/{issn}", local_var_configuration.base_path, issn=<std::string::String as AsRef<T>>::as_ref(&issn.join(",")));
| +++++++++++++++++++++++++++++++++++++++++++ ~
error[E0283]: type annotations needed
--> crossref-api/src/apis/journals_api.rs:118:120
|
118 | let local_var_uri_str = format!("{}/journals/{issn}/works", local_var_configuration.base_path, issn=issn.join(",").as_ref());
| ^^^^^^
|
= note: multiple `impl`s satisfying `std::string::String: AsRef<_>` found in the following crates: `alloc`, `std`:
- impl AsRef<OsStr> for std::string::String;
- impl AsRef<Path> for std::string::String;
- impl AsRef<[u8]> for std::string::String;
- impl AsRef<str> for std::string::String;
help: try using a fully qualified path to specify the expected types
|
118 | let local_var_uri_str = format!("{}/journals/{issn}/works", local_var_configuration.base_path, issn=<std::string::String as AsRef<T>>::as_ref(&issn.join(",")));
| +++++++++++++++++++++++++++++++++++++++++++ ~
For more information about this error, try `rustc --explain E0283`.
error: could not compile `crossref-api` (lib) due to 2 previous errors
rust-compilation exited abnormally with code 101 at Sun Sep 15 18:01:13
https://api.inaturalist.org/v1/swagger.json
The problem seems to be this line:
https://github.com/OpenAPITools/openapi-generator/blob/21f649e0873f29571b9bb9b69c7a8e962e3954d0/modules/openapi-generator/src/main/resources/rust/reqwest/api.mustache#L99