racer icon indicating copy to clipboard operation
racer copied to clipboard

racer got lost after reqwest::timeout

Open Dushistov opened this issue 5 years ago • 1 comments

Bellow the most simple example as I can create. racer can find (racer-find-definition) Client, builder, timeout, Duration, but it can not find build method. All stop working after timeout.

timeout looks like this:

    pub fn timeout<T>(&mut self, timeout: T) -> &mut ClientBuilder
    where T: Into<Option<Duration>>,

But racer can find ClientBuilder, if I put cursor to ClientBulder in timeout definition, and also if I create CliendBuilder manually it can find build method:

    let mut builder = reqwest::ClientBuilder::new();
    builder.build().unwrap();

but for some reason if put all these stuff together it can not find reqwest::ClientBuilder::build method.

extern crate reqwest;

use std::time::Duration;

fn main() {
    let client = reqwest::Client::builder()
        .timeout(Some(Duration::from_secs(30)))
        .build()
        .unwrap();
}
[package]
name = "foo"
version = "0.1.0"
authors = ["Rust Example <[email protected]>"]

[dependencies]
reqwest = "0.8.6"

Dushistov avatar Jul 25 '18 21:07 Dushistov

Thanks for reporting!

kngwyu avatar Jul 26 '18 02:07 kngwyu