Skip to content

Can't compile #1

@enderandrew

Description

@enderandrew

error[E0599]: no method named timeout_connect found for struct ureq::Request in the current scope
--> src/xkcd.rs:52:10
|
51 | let resp = ureq::get(comic.img.as_str())
| _______-
52 | | .timeout_connect(8_000)
| | -^^^^^^^^^^^^^^^ method not found in Request
| |
|
|

error[E0599]: no method named timeout_connect found for struct ureq::Request in the current scope
--> src/xkcd.rs:77:10
|
76 | let resp = ureq::get("https://c.xkcd.com/api-0/jsonp/comic")
| _______-
77 | | .timeout_connect(4_000)
| | -^^^^^^^^^^^^^^^ method not found in Request
| |
|
|

error[E0599]: no method named timeout_connect found for struct ureq::Request in the current scope
--> src/xkcd.rs:93:10
|
92 | let resp = ureq::get(format!("https://c.xkcd.com/api-0/jsonp/comic/{}", id).as_str())
| _______-
93 | | .timeout_connect(4_000)
| | -^^^^^^^^^^^^^^^ method not found in Request
| |
|
|

warning: unused import: std::io::Read
--> src/xkcd.rs:10:5
|
10 | use std::io::Read;
| ^^^^^^^^^^^^^
|
= note: #[warn(unused_imports)] on by default

For more information about this error, try rustc --explain E0599.
warning: xkcd-ascii (bin "xkcd-ascii") generated 1 warning
error: could not compile xkcd-ascii (bin "xkcd-ascii") due to 3 previous errors; 1 warning emitted

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions