Comments (4)
All the code and examples should now build successfully with no changes. CI now covers both the starting code and the examples
folder with the “solutions” to it.
from std-training.
Same as #127. Try adding ignore = "=0.4.11"
to Cargo.toml
like #128 did.
from std-training.
Thanks, that got me past one set of errors, but there are more that follow (warnings removed for brevity):
cargo build --release --example http_client
Compiling esp32-c3-dkc02-bsc v0.1.0 (/Users/stelterd/code/ferrous-systems/espressif-trainings/espressif-trainings/common/lib/esp32-c3-dkc02-bsc)
error[E0599]: no method named `submit` found for struct `EspHttpRequestWrite` in the current scope
--> examples/http_client.rs:50:31
|
50 | let mut response = writer.submit()?;
| ^^^^^^ method not found in `EspHttpRequestWrite<'_>`
error[E0191]: the value of the associated type `Error` (from trait `Errors`) must be specified
--> examples/http_client.rs:62:35
|
62 | if let Ok(size) = Read::read(&mut reader, &mut buf){
| ^^^^ help: specify the associated type: `Read<Error = Type>`
error[E0599]: no function or associated item named `read` found for trait object `dyn embedded_svc::io::Read` in the current scope
--> examples/http_client.rs:62:41
|
62 | if let Ok(size) = Read::read(&mut reader, &mut buf){
| ^^^^ function or associated item not found in `dyn embedded_svc::io::Read`
Some errors have detailed explanations: E0191, E0599.
For more information about an error, try `rustc --explain E0191`.
warning: `http-client` (example "http_client") generated 4 warnings
error: could not compile `http-client` due to 3 previous errors; 4 warnings emitted
from std-training.
It seems that there is some problem with the code in the example. I made some changes to it and it works for me now. Here is the modified code:
...
let response = write.into_response()?;
...
match status {
200..=299 => {
let mut buf = [0_u8; 256];
let mut reader = response.reader();
loop {
match reader.do_read(&mut buf) {
Ok(size) if size > 0 => {
total_size += size;
let response_text = str::from_utf8(&buf[..size])?;
println!("{}", response_text);
}
_ => break,
}
}
}
_ => anyhow::bail!("unexpected response code: {}", status),
}
...
I think it is necessary to submit a PR to fix this issue.
from std-training.
Related Issues (20)
- Use mdBook anchors instead of duplicating code
- Common crates HOT 1
- Async material
- ESP32-C6 and ZigBee examples HOT 4
- The MQTT lesson is not for ESP32? HOT 3
- Running "hardware-check" reports "This script was called from a virtual environment, can not create a virtual environment again" error HOT 2
- Compilation error when building hardware-check example for ESP32 HOT 2
- Building `esp-idf-sys` failed because of uninitialized submodules in esp-idf HOT 3
- error: unrecognized command-line option '--target=riscv32imc_zicsr_zifencei-esp-espidf HOT 2
- How to modify the configuration of SDK,such as the port port port rate HOT 4
- esp32c2 uses 26M crystal oscillator, resulting in delay errors HOT 2
- How to save and pass 'PinDriver' objects HOT 3
- WIFI Example does not compile with the esp_idf_svc crate recommended in the `esp-rs` book HOT 6
- How create multiple asynchronous tasks,task have "loop{}" HOT 3
- 'None' cannot be used for the 'Option' type in 'SpiDeviceDriver::new_single()' HOT 1
- Button interrupt on edge fired repeatedly
- Guide on interoperability with C
- hardware-check: Segment 0 0x3c090020-0x3c09fff8 invalid: bad load address range HOT 5
- RGB LED is not flashing if esp-idf-svc is 0.48.* HOT 3
- Does esp-rs support speech recognition now, or can I use the existing esp-sr?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from std-training.