You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I try to handle the Error that Api::new() may return, but it seems that it never returns a error. Here's the related code in latest commit 6303587576f8a1ce9f91f8274265a153b89afb6e:
// src/api/sync.rsimplApi{/// Creates a default Api, for Api options See [`ApiBuilder`]pubfnnew() -> Result<Self,ApiError>{ApiBuilder::new().build()}// ...}
// src/api/sync.rsimplApiBuilder{//.../// Consumes the builder and buids the final [`Api`]pubfnbuild(self) -> Result<Api,ApiError>{let headers = self.build_headers();let agent = ureq::builder().try_proxy_from_env(true).build();let client = HeaderAgent::new(agent, headers.clone());let no_redirect_agent = ureq::builder().try_proxy_from_env(true).redirects(0).build();let no_redirect_client = HeaderAgent::new(no_redirect_agent, headers);Ok(Api{endpoint:self.endpoint,url_template:self.url_template,cache:self.cache,
client,
no_redirect_client,progress:self.progress,})}}
Is it possible to modify the return value definition of this method?
The text was updated successfully, but these errors were encountered:
I try to handle the Error that Api::new() may return, but it seems that it never returns a error. Here's the related code in latest commit
6303587576f8a1ce9f91f8274265a153b89afb6e
:Is it possible to modify the return value definition of this method?
The text was updated successfully, but these errors were encountered: