reqwest-example: borrow more in ReqwestClient

This commit is contained in:
Aode (lion) 2021-11-20 13:24:30 -06:00
parent 0b8c7e8fe3
commit c90c426a99

View file

@ -14,10 +14,10 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
let breakers = BreakerSession::limit(10, Duration::from_secs(60 * 60));
let session = (RequestCountSession::max(30), breakers);
let session = (RequestCountSession::max(30), &breakers);
let client = reqwest::Client::new();
let reqwest_client = ReqwestClient::new(&client, &session, &config, crypto);
let reqwest_client = ReqwestClient::new(&client, session, &config, &crypto);
let id: ObjectId<NoteType> =
object_id("https://masto.asonix.dog/users/asonix/statuses/107289461429162429".parse()?);