Intermediate
Rust
Q78 / 100
What is the anyhow crate?
Correct! Well done.
Incorrect.
The correct answer is B) A crate providing anyhow::Error (a type-erased error) for application code where error type doesn't matter, using context() to add messages
B
Correct Answer
A crate providing anyhow::Error (a type-erased error) for application code where error type doesn't matter, using context() to add messages
Explanation
fn main() -> anyhow::Result<()> with ? on any error. file.read_to_string().context("reading config") adds context. Use thiserror for library errors, anyhow for apps.
Progress
78/100