When I add the reqwest dependency reqwest = { version = "0.11", features = ["json"] }
I start getting an unresolved reference: Result
for any Result object fn foo() -> Result<>{}
in main.rs. If I remove the "reqwest" dependency, the errors disappear. Any reasons this could happen? I'm using rustc 1.67.0-nightly.
Edit: The code compiles properly, but the code editor says 'unresolved reference: Result' and 'Result' is hilighted in red. So maybe an issue with the IDE? I'm using Pycharm.
main.rs
use std::error::Error;
fn foo() -> Result<(), Box<dyn Error>>{Ok(())}
fn main() {
println!("Hello, world!");
}
cargo.toml
[package]
name = "AoC2021"
version = "0.1.0"
edition = "2021"
[dependencies]
reqwest = { version = "0.11", features = ["json"] }