From b1d8d957f96bbf92f4abca3682dffc2367c5d449 Mon Sep 17 00:00:00 2001 From: Joel Natividad <1980690+jqnatividad@users.noreply.github.com> Date: Tue, 27 May 2025 10:46:11 -0400 Subject: [PATCH] chore: make clippy happy warning: this `else` branch is empty --> src/lib.rs:24:7 | 24 | } else { | _______^ 25 | | }; | |_____^ help: you can remove it | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_else = note: `#[warn(clippy::needless_else)]` on by default warning: unneeded unit expression --> src/lib.rs:23:9 | 23 | () | ^^ help: remove the final `()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit = note: `#[warn(clippy::unused_unit)]` on by default warning: enclosing `Ok` and `?` operator are unneeded --> src/lib.rs:822:9 | 822 | Ok(Self::get(&self, endpoint).await?) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_question_mark = note: `#[warn(clippy::needless_question_mark)]` on by default help: remove the enclosing `Ok` and `?` operator | 822 - Ok(Self::get(&self, endpoint).await?) 822 + Self::get(&self, endpoint).await | warning: this expression creates a reference which is immediately dereferenced by the compiler --> src/lib.rs:822:22 | 822 | Ok(Self::get(&self, endpoint).await?) | ^^^^^ help: change this to: `self` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow = note: `#[warn(clippy::needless_borrow)]` on by default warning: enclosing `Ok` and `?` operator are unneeded --> src/lib.rs:828:9 | 828 | Ok(Self::get(&self, endpoint).await?) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_question_mark help: remove the enclosing `Ok` and `?` operator | 828 - Ok(Self::get(&self, endpoint).await?) 828 + Self::get(&self, endpoint).await | warning: this expression creates a reference which is immediately dereferenced by the compiler --> src/lib.rs:828:22 | 828 | Ok(Self::get(&self, endpoint).await?) | ^^^^^ help: change this to: `self` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow warning: enclosing `Ok` and `?` operator are unneeded --> src/lib.rs:1246:9 | 1246 | Ok(Self::get(&self, endpoint).await?) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_question_mark help: remove the enclosing `Ok` and `?` operator | 1246 - Ok(Self::get(&self, endpoint).await?) 1246 + Self::get(&self, endpoint).await | warning: this expression creates a reference which is immediately dereferenced by the compiler --> src/lib.rs:1246:22 | 1246 | Ok(Self::get(&self, endpoint).await?) | ^^^^^ help: change this to: `self` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow warning: enclosing `Ok` and `?` operator are unneeded --> src/lib.rs:98:9 | 98 | / Ok(Self::post(&self) 99 | | .endpoint(endpoint) 100 | | .body(body) 101 | | .call() 102 | | .await?) | |____________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_question_mark help: remove the enclosing `Ok` and `?` operator | 98 ~ Self::post(&self) 99 | .endpoint(endpoint) 100 | .body(body) 101 | .call() 102 ~ .await | warning: this expression creates a reference which is immediately dereferenced by the compiler --> src/lib.rs:98:23 | 98 | Ok(Self::post(&self) | ^^^^^ help: change this to: `self` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow warning: enclosing `Ok` and `?` operator are unneeded --> src/lib.rs:119:9 | 119 | / Ok(Self::post(&self) 120 | | .endpoint(endpoint) 121 | | .body(body) 122 | | .call() 123 | | .await?) | |____________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_question_mark help: remove the enclosing `Ok` and `?` operator | 119 ~ Self::post(&self) 120 | .endpoint(endpoint) 121 | .body(body) 122 | .call() 123 ~ .await | warning: this expression creates a reference which is immediately dereferenced by the compiler --> src/lib.rs:119:23 | 119 | Ok(Self::post(&self) | ^^^^^ help: change this to: `self` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow warning: enclosing `Ok` and `?` operator are unneeded --> src/lib.rs:140:9 | 140 | / Ok(Self::post(&self) 141 | | .endpoint(endpoint) 142 | | .body(body) 143 | | .call() 144 | | .await?) | |____________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_question_mark help: remove the enclosing `Ok` and `?` operator | 140 ~ Self::post(&self) 141 | .endpoint(endpoint) 142 | .body(body) 143 | .call() 144 ~ .await | warning: this expression creates a reference which is immediately dereferenced by the compiler --> src/lib.rs:140:23 | 140 | Ok(Self::post(&self) | ^^^^^ help: change this to: `self` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow warning: enclosing `Ok` and `?` operator are unneeded --> src/lib.rs:159:9 | 159 | / Ok(Self::post(&self) 160 | | .endpoint(endpoint) 161 | | .body(body) 162 | | .call() 163 | | .await?) | |____________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_question_mark help: remove the enclosing `Ok` and `?` operator | 159 ~ Self::post(&self) 160 | .endpoint(endpoint) 161 | .body(body) 162 | .call() 163 ~ .await | warning: this expression creates a reference which is immediately dereferenced by the compiler --> src/lib.rs:159:23 | 159 | Ok(Self::post(&self) | ^^^^^ help: change this to: `self` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow warning: enclosing `Ok` and `?` operator are unneeded --> src/lib.rs:178:9 | 178 | / Ok(Self::post(&self) 179 | | .endpoint(endpoint) 180 | | .body(body) 181 | | .call() 182 | | .await?) | |____________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_question_mark help: remove the enclosing `Ok` and `?` operator | 178 ~ Self::post(&self) 179 | .endpoint(endpoint) 180 | .body(body) 181 | .call() 182 ~ .await | warning: this expression creates a reference which is immediately dereferenced by the compiler --> src/lib.rs:178:23 | 178 | Ok(Self::post(&self) | ^^^^^ help: change this to: `self` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow warning: enclosing `Ok` and `?` operator are unneeded --> src/lib.rs:217:9 | 217 | / Ok(Self::post(&self) 218 | | .endpoint(endpoint) 219 | | .body(body) 220 | | .call() 221 | | .await?) | |____________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_question_mark help: remove the enclosing `Ok` and `?` operator | 217 ~ Self::post(&self) 218 | .endpoint(endpoint) 219 | .body(body) 220 | .call() 221 ~ .await | warning: this expression creates a reference which is immediately dereferenced by the compiler --> src/lib.rs:217:23 | 217 | Ok(Self::post(&self) | ^^^^^ help: change this to: `self` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow warning: enclosing `Ok` and `?` operator are unneeded --> src/lib.rs:256:9 | 256 | / Ok(Self::post(&self) 257 | | .endpoint(endpoint) 258 | | .body(body) 259 | | .call() 260 | | .await?) | |____________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_question_mark help: remove the enclosing `Ok` and `?` operator | 256 ~ Self::post(&self) 257 | .endpoint(endpoint) 258 | .body(body) 259 | .call() 260 ~ .await | warning: this expression creates a reference which is immediately dereferenced by the compiler --> src/lib.rs:256:23 | 256 | Ok(Self::post(&self) | ^^^^^ help: change this to: `self` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow warning: enclosing `Ok` and `?` operator are unneeded --> src/lib.rs:275:9 | 275 | / Ok(Self::post(&self) 276 | | .endpoint(endpoint) 277 | | .body(body) 278 | | .call() 279 | | .await?) | |____________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_question_mark help: remove the enclosing `Ok` and `?` operator | 275 ~ Self::post(&self) 276 | .endpoint(endpoint) 277 | .body(body) 278 | .call() 279 ~ .await | warning: this expression creates a reference which is immediately dereferenced by the compiler --> src/lib.rs:275:23 | 275 | Ok(Self::post(&self) | ^^^^^ help: change this to: `self` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow warning: enclosing `Ok` and `?` operator are unneeded --> src/lib.rs:296:9 | 296 | / Ok(Self::post(&self) 297 | | .endpoint(endpoint) 298 | | .body(body) 299 | | .call() 300 | | .await?) | |____________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_question_mark help: remove the enclosing `Ok` and `?` operator | 296 ~ Self::post(&self) 297 | .endpoint(endpoint) 298 | .body(body) 299 | .call() 300 ~ .await | warning: this expression creates a reference which is immediately dereferenced by the compiler --> src/lib.rs:296:23 | 296 | Ok(Self::post(&self) | ^^^^^ help: change this to: `self` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow warning: enclosing `Ok` and `?` operator are unneeded --> src/lib.rs:307:9 | 307 | Ok(Self::post(&self).endpoint(endpoint).call().await?) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_question_mark help: remove the enclosing `Ok` and `?` operator | 307 - Ok(Self::post(&self).endpoint(endpoint).call().await?) 307 + Self::post(&self).endpoint(endpoint).call().await | warning: this expression creates a reference which is immediately dereferenced by the compiler --> src/lib.rs:307:23 | 307 | Ok(Self::post(&self).endpoint(endpoint).call().await?) | ^^^^^ help: change this to: `self` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow warning: enclosing `Ok` and `?` operator are unneeded --> src/lib.rs:324:9 | 324 | / Ok(Self::post(&self) 325 | | .endpoint(endpoint) 326 | | .body(body) 327 | | .call() 328 | | .await?) | |____________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_question_mark help: remove the enclosing `Ok` and `?` operator | 324 ~ Self::post(&self) 325 | .endpoint(endpoint) 326 | .body(body) 327 | .call() 328 ~ .await | warning: this expression creates a reference which is immediately dereferenced by the compiler --> src/lib.rs:324:23 | 324 | Ok(Self::post(&self) | ^^^^^ help: change this to: `self` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow warning: enclosing `Ok` and `?` operator are unneeded --> src/lib.rs:349:9 | 349 | / Ok(Self::post(&self) 350 | | .endpoint(endpoint) 351 | | .body(body) 352 | | .call() 353 | | .await?) | |____________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_question_mark help: remove the enclosing `Ok` and `?` operator | 349 ~ Self::post(&self) 350 | .endpoint(endpoint) 351 | .body(body) 352 | .call() 353 ~ .await | warning: this expression creates a reference which is immediately dereferenced by the compiler --> src/lib.rs:349:23 | 349 | Ok(Self::post(&self) | ^^^^^ help: change this to: `self` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow warning: enclosing `Ok` and `?` operator are unneeded --> src/lib.rs:370:9 | 370 | / Ok(Self::post(&self) 371 | | .endpoint(endpoint) 372 | | .body(body) 373 | | .call() 374 | | .await?) | |____________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_question_mark help: remove the enclosing `Ok` and `?` operator | 370 ~ Self::post(&self) 371 | .endpoint(endpoint) 372 | .body(body) 373 | .call() 374 ~ .await | warning: this expression creates a reference which is immediately dereferenced by the compiler --> src/lib.rs:370:23 | 370 | Ok(Self::post(&self) | ^^^^^ help: change this to: `self` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow warning: enclosing `Ok` and `?` operator are unneeded --> src/lib.rs:387:9 | 387 | / Ok(Self::post(&self) 388 | | .endpoint(endpoint) 389 | | .body(body) 390 | | .call() 391 | | .await?) | |____________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_question_mark help: remove the enclosing `Ok` and `?` operator | 387 ~ Self::post(&self) 388 | .endpoint(endpoint) 389 | .body(body) 390 | .call() 391 ~ .await | warning: this expression creates a reference which is immediately dereferenced by the compiler --> src/lib.rs:387:23 | 387 | Ok(Self::post(&self) | ^^^^^ help: change this to: `self` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow warning: enclosing `Ok` and `?` operator are unneeded --> src/lib.rs:404:9 | 404 | / Ok(Self::post(&self) 405 | | .endpoint(endpoint) 406 | | .body(body) 407 | | .call() 408 | | .await?) | |____________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_question_mark help: remove the enclosing `Ok` and `?` operator | 404 ~ Self::post(&self) 405 | .endpoint(endpoint) 406 | .body(body) 407 | .call() 408 ~ .await | warning: this expression creates a reference which is immediately dereferenced by the compiler --> src/lib.rs:404:23 | 404 | Ok(Self::post(&self) | ^^^^^ help: change this to: `self` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow warning: enclosing `Ok` and `?` operator are unneeded --> src/lib.rs:421:9 | 421 | / Ok(Self::post(&self) 422 | | .endpoint(endpoint) 423 | | .body(body) 424 | | .call() 425 | | .await?) | |____________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_question_mark help: remove the enclosing `Ok` and `?` operator | 421 ~ Self::post(&self) 422 | .endpoint(endpoint) 423 | .body(body) 424 | .call() 425 ~ .await | warning: this expression creates a reference which is immediately dereferenced by the compiler --> src/lib.rs:421:23 | 421 | Ok(Self::post(&self) | ^^^^^ help: change this to: `self` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow warning: enclosing `Ok` and `?` operator are unneeded --> src/lib.rs:452:9 | 452 | / Ok(Self::post(&self) 453 | | .endpoint(endpoint) 454 | | .body(body) 455 | | .call() 456 | | .await?) | |____________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_question_mark help: remove the enclosing `Ok` and `?` operator | 452 ~ Self::post(&self) 453 | .endpoint(endpoint) 454 | .body(body) 455 | .call() 456 ~ .await | warning: this expression creates a reference which is immediately dereferenced by the compiler --> src/lib.rs:452:23 | 452 | Ok(Self::post(&self) | ^^^^^ help: change this to: `self` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow warning: enclosing `Ok` and `?` operator are unneeded --> src/lib.rs:483:9 | 483 | / Ok(Self::post(&self) 484 | | .endpoint(endpoint) 485 | | .body(body) 486 | | .call() 487 | | .await?) | |____________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_question_mark help: remove the enclosing `Ok` and `?` operator | 483 ~ Self::post(&self) 484 | .endpoint(endpoint) 485 | .body(body) 486 | .call() 487 ~ .await | warning: this expression creates a reference which is immediately dereferenced by the compiler --> src/lib.rs:483:23 | 483 | Ok(Self::post(&self) | ^^^^^ help: change this to: `self` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow warning: enclosing `Ok` and `?` operator are unneeded --> src/lib.rs:502:9 | 502 | / Ok(Self::post(&self) 503 | | .endpoint(endpoint) 504 | | .body(body) 505 | | .call() 506 | | .await?) | |____________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_question_mark help: remove the enclosing `Ok` and `?` operator | 502 ~ Self::post(&self) 503 | .endpoint(endpoint) 504 | .body(body) 505 | .call() 506 ~ .await | warning: this expression creates a reference which is immediately dereferenced by the compiler --> src/lib.rs:502:23 | 502 | Ok(Self::post(&self) | ^^^^^ help: change this to: `self` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow warning: enclosing `Ok` and `?` operator are unneeded --> src/lib.rs:523:9 | 523 | / Ok(Self::post(&self) 524 | | .endpoint(endpoint) 525 | | .body(body) 526 | | .call() 527 | | .await?) | |____________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_question_mark help: remove the enclosing `Ok` and `?` operator | 523 ~ Self::post(&self) 524 | .endpoint(endpoint) 525 | .body(body) 526 | .call() 527 ~ .await | warning: this expression creates a reference which is immediately dereferenced by the compiler --> src/lib.rs:523:23 | 523 | Ok(Self::post(&self) | ^^^^^ help: change this to: `self` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow warning: enclosing `Ok` and `?` operator are unneeded --> src/lib.rs:548:9 | 548 | / Ok(Self::post(&self) 549 | | .endpoint(endpoint) 550 | | .body(body) 551 | | .call() 552 | | .await?) | |____________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_question_mark help: remove the enclosing `Ok` and `?` operator | 548 ~ Self::post(&self) 549 | .endpoint(endpoint) 550 | .body(body) 551 | .call() 552 ~ .await | warning: this expression creates a reference which is immediately dereferenced by the compiler --> src/lib.rs:548:23 | 548 | Ok(Self::post(&self) | ^^^^^ help: change this to: `self` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow warning: enclosing `Ok` and `?` operator are unneeded --> src/lib.rs:567:9 | 567 | / Ok(Self::post(&self) 568 | | .endpoint(endpoint) 569 | | .body(body) 570 | | .call() 571 | | .await?) | |____________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_question_mark help: remove the enclosing `Ok` and `?` operator | 567 ~ Self::post(&self) 568 | .endpoint(endpoint) 569 | .body(body) 570 | .call() 571 ~ .await | warning: this expression creates a reference which is immediately dereferenced by the compiler --> src/lib.rs:567:23 | 567 | Ok(Self::post(&self) | ^^^^^ help: change this to: `self` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow warning: enclosing `Ok` and `?` operator are unneeded --> src/lib.rs:586:9 | 586 | / Ok(Self::post(&self) 587 | | .endpoint(endpoint) 588 | | .body(body) 589 | | .call() 590 | | .await?) | |____________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_question_mark help: remove the enclosing `Ok` and `?` operator | 586 ~ Self::post(&self) 587 | .endpoint(endpoint) 588 | .body(body) 589 | .call() 590 ~ .await | warning: this expression creates a reference which is immediately dereferenced by the compiler --> src/lib.rs:586:23 | 586 | Ok(Self::post(&self) | ^^^^^ help: change this to: `self` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow warning: enclosing `Ok` and `?` operator are unneeded --> src/lib.rs:605:9 | 605 | / Ok(Self::post(&self) 606 | | .endpoint(endpoint) 607 | | .body(body) 608 | | .call() 609 | | .await?) | |____________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_question_mark help: remove the enclosing `Ok` and `?` operator | 605 ~ Self::post(&self) 606 | .endpoint(endpoint) 607 | .body(body) 608 | .call() 609 ~ .await | warning: this expression creates a reference which is immediately dereferenced by the compiler --> src/lib.rs:605:23 | 605 | Ok(Self::post(&self) | ^^^^^ help: change this to: `self` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow warning: enclosing `Ok` and `?` operator are unneeded --> src/lib.rs:624:9 | 624 | / Ok(Self::post(&self) 625 | | .endpoint(endpoint) 626 | | .body(body) 627 | | .call() 628 | | .await?) | |____________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_question_mark help: remove the enclosing `Ok` and `?` operator | 624 ~ Self::post(&self) 625 | .endpoint(endpoint) 626 | .body(body) 627 | .call() 628 ~ .await | warning: this expression creates a reference which is immediately dereferenced by the compiler --> src/lib.rs:624:23 | 624 | Ok(Self::post(&self) | ^^^^^ help: change this to: `self` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow warning: enclosing `Ok` and `?` operator are unneeded --> src/lib.rs:643:9 | 643 | / Ok(Self::post(&self) 644 | | .endpoint(endpoint) 645 | | .body(body) 646 | | .call() 647 | | .await?) | |____________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_question_mark help: remove the enclosing `Ok` and `?` operator | 643 ~ Self::post(&self) 644 | .endpoint(endpoint) 645 | .body(body) 646 | .call() 647 ~ .await | warning: this expression creates a reference which is immediately dereferenced by the compiler --> src/lib.rs:643:23 | 643 | Ok(Self::post(&self) | ^^^^^ help: change this to: `self` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow warning: enclosing `Ok` and `?` operator are unneeded --> src/lib.rs:684:9 | 684 | / Ok(Self::post(&self) 685 | | .endpoint(endpoint) 686 | | .body(body) 687 | | .call() 688 | | .await?) | |____________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_question_mark help: remove the enclosing `Ok` and `?` operator | 684 ~ Self::post(&self) 685 | .endpoint(endpoint) 686 | .body(body) 687 | .call() 688 ~ .await | warning: this expression creates a reference which is immediately dereferenced by the compiler --> src/lib.rs:684:23 | 684 | Ok(Self::post(&self) | ^^^^^ help: change this to: `self` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow warning: enclosing `Ok` and `?` operator are unneeded --> src/lib.rs:707:9 | 707 | / Ok(Self::post(&self) 708 | | .endpoint(endpoint) 709 | | .body(body) 710 | | .call() 711 | | .await?) | |____________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_question_mark help: remove the enclosing `Ok` and `?` operator | 707 ~ Self::post(&self) 708 | .endpoint(endpoint) 709 | .body(body) 710 | .call() 711 ~ .await | warning: this expression creates a reference which is immediately dereferenced by the compiler --> src/lib.rs:707:23 | 707 | Ok(Self::post(&self) | ^^^^^ help: change this to: `self` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow warning: enclosing `Ok` and `?` operator are unneeded --> src/lib.rs:730:9 | 730 | / Ok(Self::post(&self) 731 | | .endpoint(endpoint) 732 | | .body(body) 733 | | .call() 734 | | .await?) | |____________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_question_mark help: remove the enclosing `Ok` and `?` operator | 730 ~ Self::post(&self) 731 | .endpoint(endpoint) 732 | .body(body) 733 | .call() 734 ~ .await | warning: this expression creates a reference which is immediately dereferenced by the compiler --> src/lib.rs:730:23 | 730 | Ok(Self::post(&self) | ^^^^^ help: change this to: `self` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow warning: enclosing `Ok` and `?` operator are unneeded --> src/lib.rs:753:9 | 753 | / Ok(Self::post(&self) 754 | | .endpoint(endpoint) 755 | | .body(body) 756 | | .call() 757 | | .await?) | |____________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_question_mark help: remove the enclosing `Ok` and `?` operator | 753 ~ Self::post(&self) 754 | .endpoint(endpoint) 755 | .body(body) 756 | .call() 757 ~ .await | warning: this expression creates a reference which is immediately dereferenced by the compiler --> src/lib.rs:753:23 | 753 | Ok(Self::post(&self) | ^^^^^ help: change this to: `self` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow warning: enclosing `Ok` and `?` operator are unneeded --> src/lib.rs:776:9 | 776 | / Ok(Self::post(&self) 777 | | .endpoint(endpoint) 778 | | .body(body) 779 | | .call() 780 | | .await?) | |____________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_question_mark help: remove the enclosing `Ok` and `?` operator | 776 ~ Self::post(&self) 777 | .endpoint(endpoint) 778 | .body(body) 779 | .call() 780 ~ .await | warning: this expression creates a reference which is immediately dereferenced by the compiler --> src/lib.rs:776:23 | 776 | Ok(Self::post(&self) | ^^^^^ help: change this to: `self` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow warning: enclosing `Ok` and `?` operator are unneeded --> src/lib.rs:795:9 | 795 | / Ok(Self::post(&self) 796 | | .endpoint(endpoint) 797 | | .body(body) 798 | | .call() 799 | | .await?) | |____________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_question_mark help: remove the enclosing `Ok` and `?` operator | 795 ~ Self::post(&self) 796 | .endpoint(endpoint) 797 | .body(body) 798 | .call() 799 ~ .await | warning: this expression creates a reference which is immediately dereferenced by the compiler --> src/lib.rs:795:23 | 795 | Ok(Self::post(&self) | ^^^^^ help: change this to: `self` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow warning: type parameter `T` goes unused in function definition --> src/lib.rs:804:31 | 804 | pub async fn get_site_user( | ^^^^^^^^^^^^^^^^^^^^^ help: consider removing the parameter | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#extra_unused_type_parameters = note: `#[warn(clippy::extra_unused_type_parameters)]` on by default warning: enclosing `Ok` and `?` operator are unneeded --> src/lib.rs:812:9 | 812 | / Ok(Self::post(&self) 813 | | .endpoint(endpoint) 814 | | .body(body) 815 | | .call() 816 | | .await?) | |____________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_question_mark help: remove the enclosing `Ok` and `?` operator | 812 ~ Self::post(&self) 813 | .endpoint(endpoint) 814 | .body(body) 815 | .call() 816 ~ .await | warning: this expression creates a reference which is immediately dereferenced by the compiler --> src/lib.rs:812:23 | 812 | Ok(Self::post(&self) | ^^^^^ help: change this to: `self` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow warning: enclosing `Ok` and `?` operator are unneeded --> src/lib.rs:841:9 | 841 | / Ok(Self::post(&self) 842 | | .endpoint(endpoint) 843 | | .body(body) 844 | | .call() 845 | | .await?) | |____________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_question_mark help: remove the enclosing `Ok` and `?` operator | 841 ~ Self::post(&self) 842 | .endpoint(endpoint) 843 | .body(body) 844 | .call() 845 ~ .await | warning: this expression creates a reference which is immediately dereferenced by the compiler --> src/lib.rs:841:23 | 841 | Ok(Self::post(&self) | ^^^^^ help: change this to: `self` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow warning: enclosing `Ok` and `?` operator are unneeded --> src/lib.rs:858:9 | 858 | / Ok(Self::post(&self) 859 | | .endpoint(endpoint) 860 | | .body(body) 861 | | .call() 862 | | .await?) | |____________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_question_mark help: remove the enclosing `Ok` and `?` operator | 858 ~ Self::post(&self) 859 | .endpoint(endpoint) 860 | .body(body) 861 | .call() 862 ~ .await | warning: this expression creates a reference which is immediately dereferenced by the compiler --> src/lib.rs:858:23 | 858 | Ok(Self::post(&self) | ^^^^^ help: change this to: `self` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow warning: enclosing `Ok` and `?` operator are unneeded --> src/lib.rs:875:9 | 875 | / Ok(Self::post(&self) 876 | | .endpoint(endpoint) 877 | | .body(body) 878 | | .call() 879 | | .await?) | |____________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_question_mark help: remove the enclosing `Ok` and `?` operator | 875 ~ Self::post(&self) 876 | .endpoint(endpoint) 877 | .body(body) 878 | .call() 879 ~ .await | warning: this expression creates a reference which is immediately dereferenced by the compiler --> src/lib.rs:875:23 | 875 | Ok(Self::post(&self) | ^^^^^ help: change this to: `self` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow warning: enclosing `Ok` and `?` operator are unneeded --> src/lib.rs:892:9 | 892 | / Ok(Self::post(&self) 893 | | .endpoint(endpoint) 894 | | .body(body) 895 | | .call() 896 | | .await?) | |____________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_question_mark help: remove the enclosing `Ok` and `?` operator | 892 ~ Self::post(&self) 893 | .endpoint(endpoint) 894 | .body(body) 895 | .call() 896 ~ .await | warning: this expression creates a reference which is immediately dereferenced by the compiler --> src/lib.rs:892:23 | 892 | Ok(Self::post(&self) | ^^^^^ help: change this to: `self` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow warning: enclosing `Ok` and `?` operator are unneeded --> src/lib.rs:909:9 | 909 | / Ok(Self::post(&self) 910 | | .endpoint(endpoint) 911 | | .body(body) 912 | | .call() 913 | | .await?) | |____________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_question_mark help: remove the enclosing `Ok` and `?` operator | 909 ~ Self::post(&self) 910 | .endpoint(endpoint) 911 | .body(body) 912 | .call() 913 ~ .await | warning: this expression creates a reference which is immediately dereferenced by the compiler --> src/lib.rs:909:23 | 909 | Ok(Self::post(&self) | ^^^^^ help: change this to: `self` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow warning: enclosing `Ok` and `?` operator are unneeded --> src/lib.rs:926:9 | 926 | / Ok(Self::post(&self) 927 | | .endpoint(endpoint) 928 | | .body(body) 929 | | .call() 930 | | .await?) | |____________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_question_mark help: remove the enclosing `Ok` and `?` operator | 926 ~ Self::post(&self) 927 | .endpoint(endpoint) 928 | .body(body) 929 | .call() 930 ~ .await | warning: this expression creates a reference which is immediately dereferenced by the compiler --> src/lib.rs:926:23 | 926 | Ok(Self::post(&self) | ^^^^^ help: change this to: `self` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow warning: enclosing `Ok` and `?` operator are unneeded --> src/lib.rs:943:9 | 943 | / Ok(Self::post(&self) 944 | | .endpoint(endpoint) 945 | | .body(body) 946 | | .call() 947 | | .await?) | |____________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_question_mark help: remove the enclosing `Ok` and `?` operator | 943 ~ Self::post(&self) 944 | .endpoint(endpoint) 945 | .body(body) 946 | .call() 947 ~ .await | warning: this expression creates a reference which is immediately dereferenced by the compiler --> src/lib.rs:943:23 | 943 | Ok(Self::post(&self) | ^^^^^ help: change this to: `self` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow warning: enclosing `Ok` and `?` operator are unneeded --> src/lib.rs:960:9 | 960 | / Ok(Self::post(&self) 961 | | .endpoint(endpoint) 962 | | .body(body) 963 | | .call() 964 | | .await?) | |____________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_question_mark help: remove the enclosing `Ok` and `?` operator | 960 ~ Self::post(&self) 961 | .endpoint(endpoint) 962 | .body(body) 963 | .call() 964 ~ .await | warning: this expression creates a reference which is immediately dereferenced by the compiler --> src/lib.rs:960:23 | 960 | Ok(Self::post(&self) | ^^^^^ help: change this to: `self` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow warning: enclosing `Ok` and `?` operator are unneeded --> src/lib.rs:977:9 | 977 | / Ok(Self::post(&self) 978 | | .endpoint(endpoint) 979 | | .body(body) 980 | | .call() 981 | | .await?) | |____________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_question_mark help: remove the enclosing `Ok` and `?` operator | 977 ~ Self::post(&self) 978 | .endpoint(endpoint) 979 | .body(body) 980 | .call() 981 ~ .await | warning: this expression creates a reference which is immediately dereferenced by the compiler --> src/lib.rs:977:23 | 977 | Ok(Self::post(&self) | ^^^^^ help: change this to: `self` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow warning: enclosing `Ok` and `?` operator are unneeded --> src/lib.rs:994:9 | 994 | / Ok(Self::post(&self) 995 | | .endpoint(endpoint) 996 | | .body(body) 997 | | .call() 998 | | .await?) | |____________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_question_mark help: remove the enclosing `Ok` and `?` operator | 994 ~ Self::post(&self) 995 | .endpoint(endpoint) 996 | .body(body) 997 | .call() 998 ~ .await | warning: this expression creates a reference which is immediately dereferenced by the compiler --> src/lib.rs:994:23 | 994 | Ok(Self::post(&self) | ^^^^^ help: change this to: `self` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow warning: enclosing `Ok` and `?` operator are unneeded --> src/lib.rs:1011:9 | 1011 | / Ok(Self::post(&self) 1012 | | .endpoint(endpoint) 1013 | | .body(body) 1014 | | .call() 1015 | | .await?) | |____________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_question_mark help: remove the enclosing `Ok` and `?` operator | 1011 ~ Self::post(&self) 1012 | .endpoint(endpoint) 1013 | .body(body) 1014 | .call() 1015 ~ .await | warning: this expression creates a reference which is immediately dereferenced by the compiler --> src/lib.rs:1011:23 | 1011 | Ok(Self::post(&self) | ^^^^^ help: change this to: `self` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow warning: enclosing `Ok` and `?` operator are unneeded --> src/lib.rs:1028:9 | 1028 | / Ok(Self::post(&self) 1029 | | .endpoint(endpoint) 1030 | | .body(body) 1031 | | .call() 1032 | | .await?) | |____________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_question_mark help: remove the enclosing `Ok` and `?` operator | 1028 ~ Self::post(&self) 1029 | .endpoint(endpoint) 1030 | .body(body) 1031 | .call() 1032 ~ .await | warning: this expression creates a reference which is immediately dereferenced by the compiler --> src/lib.rs:1028:23 | 1028 | Ok(Self::post(&self) | ^^^^^ help: change this to: `self` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow warning: enclosing `Ok` and `?` operator are unneeded --> src/lib.rs:1045:9 | 1045 | / Ok(Self::post(&self) 1046 | | .endpoint(endpoint) 1047 | | .body(body) 1048 | | .call() 1049 | | .await?) | |____________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_question_mark help: remove the enclosing `Ok` and `?` operator | 1045 ~ Self::post(&self) 1046 | .endpoint(endpoint) 1047 | .body(body) 1048 | .call() 1049 ~ .await | warning: this expression creates a reference which is immediately dereferenced by the compiler --> src/lib.rs:1045:23 | 1045 | Ok(Self::post(&self) | ^^^^^ help: change this to: `self` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow warning: enclosing `Ok` and `?` operator are unneeded --> src/lib.rs:1062:9 | 1062 | / Ok(Self::post(&self) 1063 | | .endpoint(endpoint) 1064 | | .body(body) 1065 | | .call() 1066 | | .await?) | |____________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_question_mark help: remove the enclosing `Ok` and `?` operator | 1062 ~ Self::post(&self) 1063 | .endpoint(endpoint) 1064 | .body(body) 1065 | .call() 1066 ~ .await | warning: this expression creates a reference which is immediately dereferenced by the compiler --> src/lib.rs:1062:23 | 1062 | Ok(Self::post(&self) | ^^^^^ help: change this to: `self` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow warning: enclosing `Ok` and `?` operator are unneeded --> src/lib.rs:1079:9 | 1079 | / Ok(Self::post(&self) 1080 | | .endpoint(endpoint) 1081 | | .body(body) 1082 | | .call() 1083 | | .await?) | |____________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_question_mark help: remove the enclosing `Ok` and `?` operator | 1079 ~ Self::post(&self) 1080 | .endpoint(endpoint) 1081 | .body(body) 1082 | .call() 1083 ~ .await | warning: this expression creates a reference which is immediately dereferenced by the compiler --> src/lib.rs:1079:23 | 1079 | Ok(Self::post(&self) | ^^^^^ help: change this to: `self` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow warning: enclosing `Ok` and `?` operator are unneeded --> src/lib.rs:1096:9 | 1096 | / Ok(Self::post(&self) 1097 | | .endpoint(endpoint) 1098 | | .body(body) 1099 | | .call() 1100 | | .await?) | |____________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_question_mark help: remove the enclosing `Ok` and `?` operator | 1096 ~ Self::post(&self) 1097 | .endpoint(endpoint) 1098 | .body(body) 1099 | .call() 1100 ~ .await | warning: this expression creates a reference which is immediately dereferenced by the compiler --> src/lib.rs:1096:23 | 1096 | Ok(Self::post(&self) | ^^^^^ help: change this to: `self` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow warning: enclosing `Ok` and `?` operator are unneeded --> src/lib.rs:1115:9 | 1115 | / Ok(Self::post(&self) 1116 | | .endpoint(endpoint) 1117 | | .body(body) 1118 | | .call() 1119 | | .await?) | |____________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_question_mark help: remove the enclosing `Ok` and `?` operator | 1115 ~ Self::post(&self) 1116 | .endpoint(endpoint) 1117 | .body(body) 1118 | .call() 1119 ~ .await | warning: this expression creates a reference which is immediately dereferenced by the compiler --> src/lib.rs:1115:23 | 1115 | Ok(Self::post(&self) | ^^^^^ help: change this to: `self` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow warning: enclosing `Ok` and `?` operator are unneeded --> src/lib.rs:1132:9 | 1132 | / Ok(Self::post(&self) 1133 | | .endpoint(endpoint) 1134 | | .body(body) 1135 | | .call() 1136 | | .await?) | |____________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_question_mark help: remove the enclosing `Ok` and `?` operator | 1132 ~ Self::post(&self) 1133 | .endpoint(endpoint) 1134 | .body(body) 1135 | .call() 1136 ~ .await | warning: this expression creates a reference which is immediately dereferenced by the compiler --> src/lib.rs:1132:23 | 1132 | Ok(Self::post(&self) | ^^^^^ help: change this to: `self` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow warning: enclosing `Ok` and `?` operator are unneeded --> src/lib.rs:1149:9 | 1149 | / Ok(Self::post(&self) 1150 | | .endpoint(endpoint) 1151 | | .body(body) 1152 | | .call() 1153 | | .await?) | |____________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_question_mark help: remove the enclosing `Ok` and `?` operator | 1149 ~ Self::post(&self) 1150 | .endpoint(endpoint) 1151 | .body(body) 1152 | .call() 1153 ~ .await | warning: this expression creates a reference which is immediately dereferenced by the compiler --> src/lib.rs:1149:23 | 1149 | Ok(Self::post(&self) | ^^^^^ help: change this to: `self` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow warning: enclosing `Ok` and `?` operator are unneeded --> src/lib.rs:1166:9 | 1166 | / Ok(Self::post(&self) 1167 | | .endpoint(endpoint) 1168 | | .body(body) 1169 | | .call() 1170 | | .await?) | |____________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_question_mark help: remove the enclosing `Ok` and `?` operator | 1166 ~ Self::post(&self) 1167 | .endpoint(endpoint) 1168 | .body(body) 1169 | .call() 1170 ~ .await | warning: this expression creates a reference which is immediately dereferenced by the compiler --> src/lib.rs:1166:23 | 1166 | Ok(Self::post(&self) | ^^^^^ help: change this to: `self` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow warning: enclosing `Ok` and `?` operator are unneeded --> src/lib.rs:1183:9 | 1183 | / Ok(Self::post(&self) 1184 | | .endpoint(endpoint) 1185 | | .body(body) 1186 | | .call() 1187 | | .await?) | |____________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_question_mark help: remove the enclosing `Ok` and `?` operator | 1183 ~ Self::post(&self) 1184 | .endpoint(endpoint) 1185 | .body(body) 1186 | .call() 1187 ~ .await | warning: this expression creates a reference which is immediately dereferenced by the compiler --> src/lib.rs:1183:23 | 1183 | Ok(Self::post(&self) | ^^^^^ help: change this to: `self` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow warning: enclosing `Ok` and `?` operator are unneeded --> src/lib.rs:1200:9 | 1200 | / Ok(Self::post(&self) 1201 | | .endpoint(endpoint) 1202 | | .body(body) 1203 | | .call() 1204 | | .await?) | |____________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_question_mark help: remove the enclosing `Ok` and `?` operator | 1200 ~ Self::post(&self) 1201 | .endpoint(endpoint) 1202 | .body(body) 1203 | .call() 1204 ~ .await | warning: this expression creates a reference which is immediately dereferenced by the compiler --> src/lib.rs:1200:23 | 1200 | Ok(Self::post(&self) | ^^^^^ help: change this to: `self` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow warning: enclosing `Ok` and `?` operator are unneeded --> src/lib.rs:1217:9 | 1217 | / Ok(Self::post(&self) 1218 | | .endpoint(endpoint) 1219 | | .body(body) 1220 | | .call() 1221 | | .await?) | |____________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_question_mark help: remove the enclosing `Ok` and `?` operator | 1217 ~ Self::post(&self) 1218 | .endpoint(endpoint) 1219 | .body(body) 1220 | .call() 1221 ~ .await | warning: this expression creates a reference which is immediately dereferenced by the compiler --> src/lib.rs:1217:23 | 1217 | Ok(Self::post(&self) | ^^^^^ help: change this to: `self` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow warning: enclosing `Ok` and `?` operator are unneeded --> src/lib.rs:1234:9 | 1234 | / Ok(Self::post(&self) 1235 | | .endpoint(endpoint) 1236 | | .body(body) 1237 | | .call() 1238 | | .await?) | |____________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_question_mark help: remove the enclosing `Ok` and `?` operator | 1234 ~ Self::post(&self) 1235 | .endpoint(endpoint) 1236 | .body(body) 1237 | .call() 1238 ~ .await | warning: this expression creates a reference which is immediately dereferenced by the compiler --> src/lib.rs:1234:23 | 1234 | Ok(Self::post(&self) | ^^^^^ help: change this to: `self` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow warning: enclosing `Ok` and `?` operator are unneeded --> src/lib.rs:1259:9 | 1259 | / Ok(Self::post(&self) 1260 | | .endpoint(endpoint) 1261 | | .body(body) 1262 | | .call() 1263 | | .await?) | |____________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_question_mark help: remove the enclosing `Ok` and `?` operator | 1259 ~ Self::post(&self) 1260 | .endpoint(endpoint) 1261 | .body(body) 1262 | .call() 1263 ~ .await | warning: this expression creates a reference which is immediately dereferenced by the compiler --> src/lib.rs:1259:23 | 1259 | Ok(Self::post(&self) | ^^^^^ help: change this to: `self` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow warning: enclosing `Ok` and `?` operator are unneeded --> src/lib.rs:1276:9 | 1276 | / Ok(Self::post(&self) 1277 | | .endpoint(endpoint) 1278 | | .body(body) 1279 | | .call() 1280 | | .await?) | |____________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_question_mark help: remove the enclosing `Ok` and `?` operator | 1276 ~ Self::post(&self) 1277 | .endpoint(endpoint) 1278 | .body(body) 1279 | .call() 1280 ~ .await | warning: this expression creates a reference which is immediately dereferenced by the compiler --> src/lib.rs:1276:23 | 1276 | Ok(Self::post(&self) | ^^^^^ help: change this to: `self` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow warning: enclosing `Ok` and `?` operator are unneeded --> src/lib.rs:1293:9 | 1293 | / Ok(Self::post(&self) 1294 | | .endpoint(endpoint) 1295 | | .body(body) 1296 | | .call() 1297 | | .await?) | |____________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_question_mark help: remove the enclosing `Ok` and `?` operator | 1293 ~ Self::post(&self) 1294 | .endpoint(endpoint) 1295 | .body(body) 1296 | .call() 1297 ~ .await | warning: this expression creates a reference which is immediately dereferenced by the compiler --> src/lib.rs:1293:23 | 1293 | Ok(Self::post(&self) | ^^^^^ help: change this to: `self` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow warning: enclosing `Ok` and `?` operator are unneeded --> src/lib.rs:1371:9 | 1371 | / Ok(Self::post(&self) 1372 | | .endpoint(endpoint) 1373 | | .body(body) 1374 | | .call() 1375 | | .await?) | |____________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_question_mark help: remove the enclosing `Ok` and `?` operator | 1371 ~ Self::post(&self) 1372 | .endpoint(endpoint) 1373 | .body(body) 1374 | .call() 1375 ~ .await | warning: this `if` statement can be collapsed --> src/lib.rs:1355:9 | 1355 | / if let Some(custom) = custom_fields { 1356 | | if custom.is_object() { 1357 | | let custom_temp_map = custom.as_object().unwrap(); 1358 | | custom_map.extend( ... | 1364 | | } | |_________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if = note: `#[warn(clippy::collapsible_if)]` on by default help: collapse nested if block | 1355 ~ if let Some(custom) = custom_fields 1356 ~ && custom.is_object() { 1357 | let custom_temp_map = custom.as_object().unwrap(); ... 1362 | ); 1363 ~ } | warning: this expression creates a reference which is immediately dereferenced by the compiler --> src/lib.rs:1371:23 | 1371 | Ok(Self::post(&self) | ^^^^^ help: change this to: `self` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow warning: enclosing `Ok` and `?` operator are unneeded --> src/lib.rs:1416:9 | 1416 | / Ok(Self::post(&self) 1417 | | .endpoint(endpoint) 1418 | | .body(body) 1419 | | .maybe_upload(upload) 1420 | | .call() 1421 | | .await?) | |____________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_question_mark help: remove the enclosing `Ok` and `?` operator | 1416 ~ Self::post(&self) 1417 | .endpoint(endpoint) ... 1420 | .call() 1421 ~ .await | warning: this expression creates a reference which is immediately dereferenced by the compiler --> src/lib.rs:1416:23 | 1416 | Ok(Self::post(&self) | ^^^^^ help: change this to: `self` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow warning: enclosing `Ok` and `?` operator are unneeded --> src/lib.rs:1442:9 | 1442 | / Ok(Self::post(&self) 1443 | | .endpoint(endpoint) 1444 | | .body(body) 1445 | | .call() 1446 | | .await?) | |____________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_question_mark help: remove the enclosing `Ok` and `?` operator | 1442 ~ Self::post(&self) 1443 | .endpoint(endpoint) 1444 | .body(body) 1445 | .call() 1446 ~ .await | warning: this expression creates a reference which is immediately dereferenced by the compiler --> src/lib.rs:1442:23 | 1442 | Ok(Self::post(&self) | ^^^^^ help: change this to: `self` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow warning: enclosing `Ok` and `?` operator are unneeded --> src/lib.rs:1463:9 | 1463 | / Ok(Self::post(&self) 1464 | | .endpoint(endpoint) 1465 | | .body(body) 1466 | | .call() 1467 | | .await?) | |____________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_question_mark help: remove the enclosing `Ok` and `?` operator | 1463 ~ Self::post(&self) 1464 | .endpoint(endpoint) 1465 | .body(body) 1466 | .call() 1467 ~ .await | warning: this expression creates a reference which is immediately dereferenced by the compiler --> src/lib.rs:1463:23 | 1463 | Ok(Self::post(&self) | ^^^^^ help: change this to: `self` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow warning: enclosing `Ok` and `?` operator are unneeded --> src/lib.rs:1482:9 | 1482 | / Ok(Self::post(&self) 1483 | | .endpoint(endpoint) 1484 | | .body(body) 1485 | | .call() 1486 | | .await?) | |____________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_question_mark help: remove the enclosing `Ok` and `?` operator | 1482 ~ Self::post(&self) 1483 | .endpoint(endpoint) 1484 | .body(body) 1485 | .call() 1486 ~ .await | warning: this expression creates a reference which is immediately dereferenced by the compiler --> src/lib.rs:1482:23 | 1482 | Ok(Self::post(&self) | ^^^^^ help: change this to: `self` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow warning: enclosing `Ok` and `?` operator are unneeded --> src/lib.rs:1505:9 | 1505 | / Ok(Self::post(&self) 1506 | | .endpoint(endpoint) 1507 | | .body(body) 1508 | | .call() 1509 | | .await?) | |____________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_question_mark help: remove the enclosing `Ok` and `?` operator | 1505 ~ Self::post(&self) 1506 | .endpoint(endpoint) 1507 | .body(body) 1508 | .call() 1509 ~ .await | warning: this expression creates a reference which is immediately dereferenced by the compiler --> src/lib.rs:1505:23 | 1505 | Ok(Self::post(&self) | ^^^^^ help: change this to: `self` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow warning: enclosing `Ok` and `?` operator are unneeded --> src/lib.rs:1528:9 | 1528 | / Ok(Self::post(&self) 1529 | | .endpoint(endpoint) 1530 | | .body(body) 1531 | | .call() 1532 | | .await?) | |____________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_question_mark help: remove the enclosing `Ok` and `?` operator | 1528 ~ Self::post(&self) 1529 | .endpoint(endpoint) 1530 | .body(body) 1531 | .call() 1532 ~ .await | warning: this expression creates a reference which is immediately dereferenced by the compiler --> src/lib.rs:1528:23 | 1528 | Ok(Self::post(&self) | ^^^^^ help: change this to: `self` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow warning: enclosing `Ok` and `?` operator are unneeded --> src/lib.rs:1549:9 | 1549 | / Ok(Self::post(&self) 1550 | | .endpoint(endpoint) 1551 | | .body(body) 1552 | | .call() 1553 | | .await?) | |____________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_question_mark help: remove the enclosing `Ok` and `?` operator | 1549 ~ Self::post(&self) 1550 | .endpoint(endpoint) 1551 | .body(body) 1552 | .call() 1553 ~ .await | warning: this expression creates a reference which is immediately dereferenced by the compiler --> src/lib.rs:1549:23 | 1549 | Ok(Self::post(&self) | ^^^^^ help: change this to: `self` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow warning: enclosing `Ok` and `?` operator are unneeded --> src/lib.rs:1588:9 | 1588 | / Ok(Self::post(&self) 1589 | | .endpoint(endpoint) 1590 | | .body(body) 1591 | | .call() 1592 | | .await?) | |____________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_question_mark help: remove the enclosing `Ok` and `?` operator | 1588 ~ Self::post(&self) 1589 | .endpoint(endpoint) 1590 | .body(body) 1591 | .call() 1592 ~ .await | warning: this expression creates a reference which is immediately dereferenced by the compiler --> src/lib.rs:1588:23 | 1588 | Ok(Self::post(&self) | ^^^^^ help: change this to: `self` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow warning: enclosing `Ok` and `?` operator are unneeded --> src/lib.rs:1623:9 | 1623 | / Ok(Self::post(&self) 1624 | | .endpoint(endpoint) 1625 | | .body(body) 1626 | | .call() 1627 | | .await?) | |____________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_question_mark help: remove the enclosing `Ok` and `?` operator | 1623 ~ Self::post(&self) 1624 | .endpoint(endpoint) 1625 | .body(body) 1626 | .call() 1627 ~ .await | warning: this expression creates a reference which is immediately dereferenced by the compiler --> src/lib.rs:1623:23 | 1623 | Ok(Self::post(&self) | ^^^^^ help: change this to: `self` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow warning: enclosing `Ok` and `?` operator are unneeded --> src/lib.rs:1656:9 | 1656 | / Ok(Self::post(&self) 1657 | | .endpoint(endpoint) 1658 | | .body(body) 1659 | | .call() 1660 | | .await?) | |____________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_question_mark help: remove the enclosing `Ok` and `?` operator | 1656 ~ Self::post(&self) 1657 | .endpoint(endpoint) 1658 | .body(body) 1659 | .call() 1660 ~ .await | warning: this expression creates a reference which is immediately dereferenced by the compiler --> src/lib.rs:1656:23 | 1656 | Ok(Self::post(&self) | ^^^^^ help: change this to: `self` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow warning: enclosing `Ok` and `?` operator are unneeded --> src/lib.rs:1677:9 | 1677 | / Ok(Self::post(&self) 1678 | | .endpoint(endpoint) 1679 | | .body(body) 1680 | | .call() 1681 | | .await?) | |____________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_question_mark help: remove the enclosing `Ok` and `?` operator | 1677 ~ Self::post(&self) 1678 | .endpoint(endpoint) 1679 | .body(body) 1680 | .call() 1681 ~ .await | warning: this expression creates a reference which is immediately dereferenced by the compiler --> src/lib.rs:1677:23 | 1677 | Ok(Self::post(&self) | ^^^^^ help: change this to: `self` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow warning: enclosing `Ok` and `?` operator are unneeded --> src/lib.rs:1696:9 | 1696 | / Ok(Self::post(&self) 1697 | | .endpoint(endpoint) 1698 | | .body(body) 1699 | | .call() 1700 | | .await?) | |____________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_question_mark help: remove the enclosing `Ok` and `?` operator | 1696 ~ Self::post(&self) 1697 | .endpoint(endpoint) 1698 | .body(body) 1699 | .call() 1700 ~ .await | warning: this expression creates a reference which is immediately dereferenced by the compiler --> src/lib.rs:1696:23 | 1696 | Ok(Self::post(&self) | ^^^^^ help: change this to: `self` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow warning: enclosing `Ok` and `?` operator are unneeded --> src/lib.rs:1715:9 | 1715 | / Ok(Self::post(&self) 1716 | | .endpoint(endpoint) 1717 | | .body(body) 1718 | | .call() 1719 | | .await?) | |____________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_question_mark help: remove the enclosing `Ok` and `?` operator | 1715 ~ Self::post(&self) 1716 | .endpoint(endpoint) 1717 | .body(body) 1718 | .call() 1719 ~ .await | warning: this expression creates a reference which is immediately dereferenced by the compiler --> src/lib.rs:1715:23 | 1715 | Ok(Self::post(&self) | ^^^^^ help: change this to: `self` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow warning: enclosing `Ok` and `?` operator are unneeded --> src/lib.rs:1732:9 | 1732 | / Ok(Self::post(&self) 1733 | | .endpoint(endpoint) 1734 | | .body(body) 1735 | | .call() 1736 | | .await?) | |____________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_question_mark help: remove the enclosing `Ok` and `?` operator | 1732 ~ Self::post(&self) 1733 | .endpoint(endpoint) 1734 | .body(body) 1735 | .call() 1736 ~ .await | warning: this expression creates a reference which is immediately dereferenced by the compiler --> src/lib.rs:1732:23 | 1732 | Ok(Self::post(&self) | ^^^^^ help: change this to: `self` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow warning: enclosing `Ok` and `?` operator are unneeded --> src/lib.rs:1749:9 | 1749 | / Ok(Self::post(&self) 1750 | | .endpoint(endpoint) 1751 | | .body(body) 1752 | | .call() 1753 | | .await?) | |____________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_question_mark help: remove the enclosing `Ok` and `?` operator | 1749 ~ Self::post(&self) 1750 | .endpoint(endpoint) 1751 | .body(body) 1752 | .call() 1753 ~ .await | warning: this expression creates a reference which is immediately dereferenced by the compiler --> src/lib.rs:1749:23 | 1749 | Ok(Self::post(&self) | ^^^^^ help: change this to: `self` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow warning: enclosing `Ok` and `?` operator are unneeded --> src/lib.rs:1770:9 | 1770 | / Ok(Self::post(&self) 1771 | | .endpoint(endpoint) 1772 | | .body(body) 1773 | | .call() 1774 | | .await?) | |____________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_question_mark help: remove the enclosing `Ok` and `?` operator | 1770 ~ Self::post(&self) 1771 | .endpoint(endpoint) 1772 | .body(body) 1773 | .call() 1774 ~ .await | warning: this expression creates a reference which is immediately dereferenced by the compiler --> src/lib.rs:1770:23 | 1770 | Ok(Self::post(&self) | ^^^^^ help: change this to: `self` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow warning: enclosing `Ok` and `?` operator are unneeded --> src/lib.rs:1791:9 | 1791 | / Ok(Self::post(&self) 1792 | | .endpoint(endpoint) 1793 | | .body(body) 1794 | | .call() 1795 | | .await?) | |____________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_question_mark help: remove the enclosing `Ok` and `?` operator | 1791 ~ Self::post(&self) 1792 | .endpoint(endpoint) 1793 | .body(body) 1794 | .call() 1795 ~ .await | warning: this expression creates a reference which is immediately dereferenced by the compiler --> src/lib.rs:1791:23 | 1791 | Ok(Self::post(&self) | ^^^^^ help: change this to: `self` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow warning: enclosing `Ok` and `?` operator are unneeded --> src/lib.rs:1808:9 | 1808 | / Ok(Self::post(&self) 1809 | | .endpoint(endpoint) 1810 | | .body(body) 1811 | | .call() 1812 | | .await?) | |____________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_question_mark help: remove the enclosing `Ok` and `?` operator | 1808 ~ Self::post(&self) 1809 | .endpoint(endpoint) 1810 | .body(body) 1811 | .call() 1812 ~ .await | warning: this expression creates a reference which is immediately dereferenced by the compiler --> src/lib.rs:1808:23 | 1808 | Ok(Self::post(&self) | ^^^^^ help: change this to: `self` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow warning: enclosing `Ok` and `?` operator are unneeded --> src/lib.rs:1827:9 | 1827 | / Ok(Self::post(&self) 1828 | | .endpoint(endpoint) 1829 | | .body(body) 1830 | | .call() 1831 | | .await?) | |____________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_question_mark help: remove the enclosing `Ok` and `?` operator | 1827 ~ Self::post(&self) 1828 | .endpoint(endpoint) 1829 | .body(body) 1830 | .call() 1831 ~ .await | warning: this expression creates a reference which is immediately dereferenced by the compiler --> src/lib.rs:1827:23 | 1827 | Ok(Self::post(&self) | ^^^^^ help: change this to: `self` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow warning: enclosing `Ok` and `?` operator are unneeded --> src/lib.rs:1874:9 | 1874 | / Ok(Self::post(&self) 1875 | | .endpoint(endpoint) 1876 | | .body(body) 1877 | | .maybe_upload(upload) 1878 | | .call() 1879 | | .await?) | |____________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_question_mark help: remove the enclosing `Ok` and `?` operator | 1874 ~ Self::post(&self) 1875 | .endpoint(endpoint) ... 1878 | .call() 1879 ~ .await | warning: this expression creates a reference which is immediately dereferenced by the compiler --> src/lib.rs:1874:23 | 1874 | Ok(Self::post(&self) | ^^^^^ help: change this to: `self` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow warning: enclosing `Ok` and `?` operator are unneeded --> src/lib.rs:1902:9 | 1902 | / Ok(Self::post(&self) 1903 | | .endpoint(endpoint) 1904 | | .body(body) 1905 | | .call() 1906 | | .await?) | |____________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_question_mark help: remove the enclosing `Ok` and `?` operator | 1902 ~ Self::post(&self) 1903 | .endpoint(endpoint) 1904 | .body(body) 1905 | .call() 1906 ~ .await | warning: this expression creates a reference which is immediately dereferenced by the compiler --> src/lib.rs:1902:23 | 1902 | Ok(Self::post(&self) | ^^^^^ help: change this to: `self` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow warning: enclosing `Ok` and `?` operator are unneeded --> src/lib.rs:1921:9 | 1921 | / Ok(Self::post(&self) 1922 | | .endpoint(endpoint) 1923 | | .body(body) 1924 | | .call() 1925 | | .await?) | |____________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_question_mark help: remove the enclosing `Ok` and `?` operator | 1921 ~ Self::post(&self) 1922 | .endpoint(endpoint) 1923 | .body(body) 1924 | .call() 1925 ~ .await | warning: this expression creates a reference which is immediately dereferenced by the compiler --> src/lib.rs:1921:23 | 1921 | Ok(Self::post(&self) | ^^^^^ help: change this to: `self` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow warning: enclosing `Ok` and `?` operator are unneeded --> src/lib.rs:2001:9 | 2001 | / Ok(Self::post(&self) 2002 | | .endpoint(endpoint) 2003 | | .body(body) 2004 | | .call() 2005 | | .await?) | |____________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_question_mark help: remove the enclosing `Ok` and `?` operator | 2001 ~ Self::post(&self) 2002 | .endpoint(endpoint) 2003 | .body(body) 2004 | .call() 2005 ~ .await | warning: this `if` statement can be collapsed --> src/lib.rs:1985:9 | 1985 | / if let Some(custom) = custom_fields { 1986 | | if custom.is_object() { 1987 | | let custom_temp_map = custom.as_object().unwrap(); 1988 | | custom_map.extend( ... | 1994 | | } | |_________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if help: collapse nested if block | 1985 ~ if let Some(custom) = custom_fields 1986 ~ && custom.is_object() { 1987 | let custom_temp_map = custom.as_object().unwrap(); ... 1992 | ); 1993 ~ } | warning: this expression creates a reference which is immediately dereferenced by the compiler --> src/lib.rs:2001:23 | 2001 | Ok(Self::post(&self) | ^^^^^ help: change this to: `self` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow warning: enclosing `Ok` and `?` operator are unneeded --> src/lib.rs:2024:9 | 2024 | / Ok(Self::post(&self) 2025 | | .endpoint(endpoint) 2026 | | .body(body) 2027 | | .call() 2028 | | .await?) | |____________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_question_mark help: remove the enclosing `Ok` and `?` operator | 2024 ~ Self::post(&self) 2025 | .endpoint(endpoint) 2026 | .body(body) 2027 | .call() 2028 ~ .await | warning: this expression creates a reference which is immediately dereferenced by the compiler --> src/lib.rs:2024:23 | 2024 | Ok(Self::post(&self) | ^^^^^ help: change this to: `self` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow warning: enclosing `Ok` and `?` operator are unneeded --> src/lib.rs:2043:9 | 2043 | / Ok(Self::post(&self) 2044 | | .endpoint(endpoint) 2045 | | .body(body) 2046 | | .call() 2047 | | .await?) | |____________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_question_mark help: remove the enclosing `Ok` and `?` operator | 2043 ~ Self::post(&self) 2044 | .endpoint(endpoint) 2045 | .body(body) 2046 | .call() 2047 ~ .await | warning: this expression creates a reference which is immediately dereferenced by the compiler --> src/lib.rs:2043:23 | 2043 | Ok(Self::post(&self) | ^^^^^ help: change this to: `self` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow warning: enclosing `Ok` and `?` operator are unneeded --> src/lib.rs:2066:9 | 2066 | / Ok(Self::post(&self) 2067 | | .endpoint(endpoint) 2068 | | .body(body) 2069 | | .call() 2070 | | .await?) | |____________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_question_mark help: remove the enclosing `Ok` and `?` operator | 2066 ~ Self::post(&self) 2067 | .endpoint(endpoint) 2068 | .body(body) 2069 | .call() 2070 ~ .await | warning: this expression creates a reference which is immediately dereferenced by the compiler --> src/lib.rs:2066:23 | 2066 | Ok(Self::post(&self) | ^^^^^ help: change this to: `self` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow warning: enclosing `Ok` and `?` operator are unneeded --> src/lib.rs:2105:9 | 2105 | / Ok(Self::post(&self) 2106 | | .endpoint(endpoint) 2107 | | .body(body) 2108 | | .call() 2109 | | .await?) | |____________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_question_mark help: remove the enclosing `Ok` and `?` operator | 2105 ~ Self::post(&self) 2106 | .endpoint(endpoint) 2107 | .body(body) 2108 | .call() 2109 ~ .await | warning: this expression creates a reference which is immediately dereferenced by the compiler --> src/lib.rs:2105:23 | 2105 | Ok(Self::post(&self) | ^^^^^ help: change this to: `self` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow warning: enclosing `Ok` and `?` operator are unneeded --> src/lib.rs:2138:9 | 2138 | / Ok(Self::post(&self) 2139 | | .endpoint(endpoint) 2140 | | .body(body) 2141 | | .call() 2142 | | .await?) | |____________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_question_mark help: remove the enclosing `Ok` and `?` operator | 2138 ~ Self::post(&self) 2139 | .endpoint(endpoint) 2140 | .body(body) 2141 | .call() 2142 ~ .await | warning: this expression creates a reference which is immediately dereferenced by the compiler --> src/lib.rs:2138:23 | 2138 | Ok(Self::post(&self) | ^^^^^ help: change this to: `self` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow warning: enclosing `Ok` and `?` operator are unneeded --> src/lib.rs:2171:9 | 2171 | / Ok(Self::post(&self) 2172 | | .endpoint(endpoint) 2173 | | .body(body) 2174 | | .call() 2175 | | .await?) | |____________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_question_mark help: remove the enclosing `Ok` and `?` operator | 2171 ~ Self::post(&self) 2172 | .endpoint(endpoint) 2173 | .body(body) 2174 | .call() 2175 ~ .await | warning: this expression creates a reference which is immediately dereferenced by the compiler --> src/lib.rs:2171:23 | 2171 | Ok(Self::post(&self) | ^^^^^ help: change this to: `self` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow warning: enclosing `Ok` and `?` operator are unneeded --> src/lib.rs:2204:9 | 2204 | / Ok(Self::post(&self) 2205 | | .endpoint(endpoint) 2206 | | .body(body) 2207 | | .call() 2208 | | .await?) | |____________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_question_mark help: remove the enclosing `Ok` and `?` operator | 2204 ~ Self::post(&self) 2205 | .endpoint(endpoint) 2206 | .body(body) 2207 | .call() 2208 ~ .await | warning: this expression creates a reference which is immediately dereferenced by the compiler --> src/lib.rs:2204:23 | 2204 | Ok(Self::post(&self) | ^^^^^ help: change this to: `self` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow warning: enclosing `Ok` and `?` operator are unneeded --> src/lib.rs:2221:9 | 2221 | / Ok(Self::post(&self) 2222 | | .endpoint(endpoint) 2223 | | .body(body) 2224 | | .call() 2225 | | .await?) | |____________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_question_mark help: remove the enclosing `Ok` and `?` operator | 2221 ~ Self::post(&self) 2222 | .endpoint(endpoint) 2223 | .body(body) 2224 | .call() 2225 ~ .await | warning: this expression creates a reference which is immediately dereferenced by the compiler --> src/lib.rs:2221:23 | 2221 | Ok(Self::post(&self) | ^^^^^ help: change this to: `self` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow warning: enclosing `Ok` and `?` operator are unneeded --> src/lib.rs:2242:9 | 2242 | / Ok(Self::post(&self) 2243 | | .endpoint(endpoint) 2244 | | .body(body) 2245 | | .call() 2246 | | .await?) | |____________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_question_mark help: remove the enclosing `Ok` and `?` operator | 2242 ~ Self::post(&self) 2243 | .endpoint(endpoint) 2244 | .body(body) 2245 | .call() 2246 ~ .await | warning: this expression creates a reference which is immediately dereferenced by the compiler --> src/lib.rs:2242:23 | 2242 | Ok(Self::post(&self) | ^^^^^ help: change this to: `self` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow warning: enclosing `Ok` and `?` operator are unneeded --> src/lib.rs:2259:9 | 2259 | / Ok(Self::post(&self) 2260 | | .endpoint(endpoint) 2261 | | .body(body) 2262 | | .call() 2263 | | .await?) | |____________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_question_mark help: remove the enclosing `Ok` and `?` operator | 2259 ~ Self::post(&self) 2260 | .endpoint(endpoint) 2261 | .body(body) 2262 | .call() 2263 ~ .await | warning: this expression creates a reference which is immediately dereferenced by the compiler --> src/lib.rs:2259:23 | 2259 | Ok(Self::post(&self) | ^^^^^ help: change this to: `self` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow warning: enclosing `Ok` and `?` operator are unneeded --> src/lib.rs:2280:9 | 2280 | / Ok(Self::post(&self) 2281 | | .endpoint(endpoint) 2282 | | .body(body) 2283 | | .call() 2284 | | .await?) | |____________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_question_mark help: remove the enclosing `Ok` and `?` operator | 2280 ~ Self::post(&self) 2281 | .endpoint(endpoint) 2282 | .body(body) 2283 | .call() 2284 ~ .await | warning: this expression creates a reference which is immediately dereferenced by the compiler --> src/lib.rs:2280:23 | 2280 | Ok(Self::post(&self) | ^^^^^ help: change this to: `self` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow warning: enclosing `Ok` and `?` operator are unneeded --> src/lib.rs:2299:9 | 2299 | / Ok(Self::post(&self) 2300 | | .endpoint(endpoint) 2301 | | .body(body) 2302 | | .call() 2303 | | .await?) | |____________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_question_mark help: remove the enclosing `Ok` and `?` operator | 2299 ~ Self::post(&self) 2300 | .endpoint(endpoint) 2301 | .body(body) 2302 | .call() 2303 ~ .await | warning: this expression creates a reference which is immediately dereferenced by the compiler --> src/lib.rs:2299:23 | 2299 | Ok(Self::post(&self) | ^^^^^ help: change this to: `self` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow warning: enclosing `Ok` and `?` operator are unneeded --> src/lib.rs:2318:9 | 2318 | / Ok(Self::post(&self) 2319 | | .endpoint(endpoint) 2320 | | .body(body) 2321 | | .call() 2322 | | .await?) | |____________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_question_mark help: remove the enclosing `Ok` and `?` operator | 2318 ~ Self::post(&self) 2319 | .endpoint(endpoint) 2320 | .body(body) 2321 | .call() 2322 ~ .await | warning: this expression creates a reference which is immediately dereferenced by the compiler --> src/lib.rs:2318:23 | 2318 | Ok(Self::post(&self) | ^^^^^ help: change this to: `self` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow warning: enclosing `Ok` and `?` operator are unneeded --> src/lib.rs:2337:9 | 2337 | / Ok(Self::post(&self) 2338 | | .endpoint(endpoint) 2339 | | .body(body) 2340 | | .call() 2341 | | .await?) | |____________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_question_mark help: remove the enclosing `Ok` and `?` operator | 2337 ~ Self::post(&self) 2338 | .endpoint(endpoint) 2339 | .body(body) 2340 | .call() 2341 ~ .await | warning: this expression creates a reference which is immediately dereferenced by the compiler --> src/lib.rs:2337:23 | 2337 | Ok(Self::post(&self) | ^^^^^ help: change this to: `self` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow warning: enclosing `Ok` and `?` operator are unneeded --> src/lib.rs:2356:9 | 2356 | / Ok(Self::post(&self) 2357 | | .endpoint(endpoint) 2358 | | .body(body) 2359 | | .call() 2360 | | .await?) | |____________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_question_mark help: remove the enclosing `Ok` and `?` operator | 2356 ~ Self::post(&self) 2357 | .endpoint(endpoint) 2358 | .body(body) 2359 | .call() 2360 ~ .await | warning: this expression creates a reference which is immediately dereferenced by the compiler --> src/lib.rs:2356:23 | 2356 | Ok(Self::post(&self) | ^^^^^ help: change this to: `self` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow warning: enclosing `Ok` and `?` operator are unneeded --> src/lib.rs:2389:9 | 2389 | / Ok(Self::post(&self) 2390 | | .endpoint(endpoint) 2391 | | .body(body) 2392 | | .call() 2393 | | .await?) | |____________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_question_mark help: remove the enclosing `Ok` and `?` operator | 2389 ~ Self::post(&self) 2390 | .endpoint(endpoint) 2391 | .body(body) 2392 | .call() 2393 ~ .await | warning: this `if` statement can be collapsed --> src/lib.rs:2373:9 | 2373 | / if let Some(options_obj) = options { 2374 | | if options_obj.is_object() { 2375 | | let custom_temp_map = options_obj.as_object().unwrap(); 2376 | | custom_map.extend( ... | 2382 | | } | |_________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if help: collapse nested if block | 2373 ~ if let Some(options_obj) = options 2374 ~ && options_obj.is_object() { 2375 | let custom_temp_map = options_obj.as_object().unwrap(); ... 2380 | ); 2381 ~ } | warning: this expression creates a reference which is immediately dereferenced by the compiler --> src/lib.rs:2389:23 | 2389 | Ok(Self::post(&self) | ^^^^^ help: change this to: `self` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow warning: enclosing `Ok` and `?` operator are unneeded --> src/lib.rs:2469:9 | 2469 | / Ok(Self::post(&self) 2470 | | .endpoint(endpoint) 2471 | | .body(body) 2472 | | .call() 2473 | | .await?) | |____________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_question_mark help: remove the enclosing `Ok` and `?` operator | 2469 ~ Self::post(&self) 2470 | .endpoint(endpoint) 2471 | .body(body) 2472 | .call() 2473 ~ .await | warning: this `if` statement can be collapsed --> src/lib.rs:2453:9 | 2453 | / if let Some(custom) = custom_fields { 2454 | | if custom.is_object() { 2455 | | let custom_temp_map = custom.as_object().unwrap(); 2456 | | custom_map.extend( ... | 2462 | | } | |_________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if help: collapse nested if block | 2453 ~ if let Some(custom) = custom_fields 2454 ~ && custom.is_object() { 2455 | let custom_temp_map = custom.as_object().unwrap(); ... 2460 | ); 2461 ~ } | warning: this expression creates a reference which is immediately dereferenced by the compiler --> src/lib.rs:2469:23 | 2469 | Ok(Self::post(&self) | ^^^^^ help: change this to: `self` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow warning: enclosing `Ok` and `?` operator are unneeded --> src/lib.rs:2516:9 | 2516 | / Ok(Self::post(&self) 2517 | | .endpoint(endpoint) 2518 | | .body(body) 2519 | | .maybe_upload(upload) 2520 | | .call() 2521 | | .await?) | |____________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_question_mark help: remove the enclosing `Ok` and `?` operator | 2516 ~ Self::post(&self) 2517 | .endpoint(endpoint) ... 2520 | .call() 2521 ~ .await | warning: this expression creates a reference which is immediately dereferenced by the compiler --> src/lib.rs:2516:23 | 2516 | Ok(Self::post(&self) | ^^^^^ help: change this to: `self` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow warning: enclosing `Ok` and `?` operator are unneeded --> src/lib.rs:2556:9 | 2556 | / Ok(Self::post(&self) 2557 | | .endpoint(endpoint) 2558 | | .body(body) 2559 | | .call() 2560 | | .await?) | |____________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_question_mark help: remove the enclosing `Ok` and `?` operator | 2556 ~ Self::post(&self) 2557 | .endpoint(endpoint) 2558 | .body(body) 2559 | .call() 2560 ~ .await | warning: this expression creates a reference which is immediately dereferenced by the compiler --> src/lib.rs:2556:23 | 2556 | Ok(Self::post(&self) | ^^^^^ help: change this to: `self` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow warning: enclosing `Ok` and `?` operator are unneeded --> src/lib.rs:2589:9 | 2589 | / Ok(Self::post(&self) 2590 | | .endpoint(endpoint) 2591 | | .body(body) 2592 | | .call() 2593 | | .await?) | |____________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_question_mark help: remove the enclosing `Ok` and `?` operator | 2589 ~ Self::post(&self) 2590 | .endpoint(endpoint) 2591 | .body(body) 2592 | .call() 2593 ~ .await | warning: this expression creates a reference which is immediately dereferenced by the compiler --> src/lib.rs:2589:23 | 2589 | Ok(Self::post(&self) | ^^^^^ help: change this to: `self` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow warning: enclosing `Ok` and `?` operator are unneeded --> src/lib.rs:2622:9 | 2622 | / Ok(Self::post(&self) 2623 | | .endpoint(endpoint) 2624 | | .body(body) 2625 | | .call() 2626 | | .await?) | |____________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_question_mark help: remove the enclosing `Ok` and `?` operator | 2622 ~ Self::post(&self) 2623 | .endpoint(endpoint) 2624 | .body(body) 2625 | .call() 2626 ~ .await | warning: this expression creates a reference which is immediately dereferenced by the compiler --> src/lib.rs:2622:23 | 2622 | Ok(Self::post(&self) | ^^^^^ help: change this to: `self` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow warning: enclosing `Ok` and `?` operator are unneeded --> src/lib.rs:2639:9 | 2639 | / Ok(Self::post(&self) 2640 | | .endpoint(endpoint) 2641 | | .body(body) 2642 | | .call() 2643 | | .await?) | |____________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_question_mark help: remove the enclosing `Ok` and `?` operator | 2639 ~ Self::post(&self) 2640 | .endpoint(endpoint) 2641 | .body(body) 2642 | .call() 2643 ~ .await | warning: this expression creates a reference which is immediately dereferenced by the compiler --> src/lib.rs:2639:23 | 2639 | Ok(Self::post(&self) | ^^^^^ help: change this to: `self` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow warning: enclosing `Ok` and `?` operator are unneeded --> src/lib.rs:2656:9 | 2656 | / Ok(Self::post(&self) 2657 | | .endpoint(endpoint) 2658 | | .body(body) 2659 | | .call() 2660 | | .await?) | |____________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_question_mark help: remove the enclosing `Ok` and `?` operator | 2656 ~ Self::post(&self) 2657 | .endpoint(endpoint) 2658 | .body(body) 2659 | .call() 2660 ~ .await | warning: this expression creates a reference which is immediately dereferenced by the compiler --> src/lib.rs:2656:23 | 2656 | Ok(Self::post(&self) | ^^^^^ help: change this to: `self` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow warning: enclosing `Ok` and `?` operator are unneeded --> src/lib.rs:2673:9 | 2673 | / Ok(Self::post(&self) 2674 | | .endpoint(endpoint) 2675 | | .body(body) 2676 | | .call() 2677 | | .await?) | |____________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_question_mark help: remove the enclosing `Ok` and `?` operator | 2673 ~ Self::post(&self) 2674 | .endpoint(endpoint) 2675 | .body(body) 2676 | .call() 2677 ~ .await | warning: this expression creates a reference which is immediately dereferenced by the compiler --> src/lib.rs:2673:23 | 2673 | Ok(Self::post(&self) | ^^^^^ help: change this to: `self` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow warning: enclosing `Ok` and `?` operator are unneeded --> src/lib.rs:2690:9 | 2690 | / Ok(Self::post(&self) 2691 | | .endpoint(endpoint) 2692 | | .body(body) 2693 | | .call() 2694 | | .await?) | |____________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_question_mark help: remove the enclosing `Ok` and `?` operator | 2690 ~ Self::post(&self) 2691 | .endpoint(endpoint) 2692 | .body(body) 2693 | .call() 2694 ~ .await | warning: this expression creates a reference which is immediately dereferenced by the compiler --> src/lib.rs:2690:23 | 2690 | Ok(Self::post(&self) | ^^^^^ help: change this to: `self` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow warning: enclosing `Ok` and `?` operator are unneeded --> src/lib.rs:2707:9 | 2707 | / Ok(Self::post(&self) 2708 | | .endpoint(endpoint) 2709 | | .body(body) 2710 | | .call() 2711 | | .await?) | |____________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_question_mark help: remove the enclosing `Ok` and `?` operator | 2707 ~ Self::post(&self) 2708 | .endpoint(endpoint) 2709 | .body(body) 2710 | .call() 2711 ~ .await | warning: this expression creates a reference which is immediately dereferenced by the compiler --> src/lib.rs:2707:23 | 2707 | Ok(Self::post(&self) | ^^^^^ help: change this to: `self` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow warning: enclosing `Ok` and `?` operator are unneeded --> src/lib.rs:2724:9 | 2724 | / Ok(Self::post(&self) 2725 | | .endpoint(endpoint) 2726 | | .body(body) 2727 | | .call() 2728 | | .await?) | |____________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_question_mark help: remove the enclosing `Ok` and `?` operator | 2724 ~ Self::post(&self) 2725 | .endpoint(endpoint) 2726 | .body(body) 2727 | .call() 2728 ~ .await | warning: this expression creates a reference which is immediately dereferenced by the compiler --> src/lib.rs:2724:23 | 2724 | Ok(Self::post(&self) | ^^^^^ help: change this to: `self` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow warning: enclosing `Ok` and `?` operator are unneeded --> src/lib.rs:2745:9 | 2745 | / Ok(Self::post(&self) 2746 | | .endpoint(endpoint) 2747 | | .body(body) 2748 | | .call() 2749 | | .await?) | |____________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_question_mark help: remove the enclosing `Ok` and `?` operator | 2745 ~ Self::post(&self) 2746 | .endpoint(endpoint) 2747 | .body(body) 2748 | .call() 2749 ~ .await | warning: this expression creates a reference which is immediately dereferenced by the compiler --> src/lib.rs:2745:23 | 2745 | Ok(Self::post(&self) | ^^^^^ help: change this to: `self` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow warning: enclosing `Ok` and `?` operator are unneeded --> src/lib.rs:2766:9 | 2766 | / Ok(Self::post(&self) 2767 | | .endpoint(endpoint) 2768 | | .body(body) 2769 | | .call() 2770 | | .await?) | |____________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_question_mark help: remove the enclosing `Ok` and `?` operator | 2766 ~ Self::post(&self) 2767 | .endpoint(endpoint) 2768 | .body(body) 2769 | .call() 2770 ~ .await | warning: this expression creates a reference which is immediately dereferenced by the compiler --> src/lib.rs:2766:23 | 2766 | Ok(Self::post(&self) | ^^^^^ help: change this to: `self` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow warning: enclosing `Ok` and `?` operator are unneeded --> src/lib.rs:2785:9 | 2785 | / Ok(Self::post(&self) 2786 | | .endpoint(endpoint) 2787 | | .body(body) 2788 | | .call() 2789 | | .await?) | |____________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_question_mark help: remove the enclosing `Ok` and `?` operator | 2785 ~ Self::post(&self) 2786 | .endpoint(endpoint) 2787 | .body(body) 2788 | .call() 2789 ~ .await | warning: this expression creates a reference which is immediately dereferenced by the compiler --> src/lib.rs:2785:23 | 2785 | Ok(Self::post(&self) | ^^^^^ help: change this to: `self` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow warning: enclosing `Ok` and `?` operator are unneeded --> src/lib.rs:2802:9 | 2802 | / Ok(Self::post(&self) 2803 | | .endpoint(endpoint) 2804 | | .body(body) 2805 | | .call() 2806 | | .await?) | |____________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_question_mark help: remove the enclosing `Ok` and `?` operator | 2802 ~ Self::post(&self) 2803 | .endpoint(endpoint) 2804 | .body(body) 2805 | .call() 2806 ~ .await | warning: this expression creates a reference which is immediately dereferenced by the compiler --> src/lib.rs:2802:23 | 2802 | Ok(Self::post(&self) | ^^^^^ help: change this to: `self` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow warning: enclosing `Ok` and `?` operator are unneeded --> src/lib.rs:2819:9 | 2819 | / Ok(Self::post(&self) 2820 | | .endpoint(endpoint) 2821 | | .body(body) 2822 | | .call() 2823 | | .await?) | |____________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_question_mark help: remove the enclosing `Ok` and `?` operator | 2819 ~ Self::post(&self) 2820 | .endpoint(endpoint) 2821 | .body(body) 2822 | .call() 2823 ~ .await | warning: this expression creates a reference which is immediately dereferenced by the compiler --> src/lib.rs:2819:23 | 2819 | Ok(Self::post(&self) | ^^^^^ help: change this to: `self` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow warning: enclosing `Ok` and `?` operator are unneeded --> src/lib.rs:2836:9 | 2836 | / Ok(Self::post(&self) 2837 | | .endpoint(endpoint) 2838 | | .body(body) 2839 | | .call() 2840 | | .await?) | |____________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_question_mark help: remove the enclosing `Ok` and `?` operator | 2836 ~ Self::post(&self) 2837 | .endpoint(endpoint) 2838 | .body(body) 2839 | .call() 2840 ~ .await | warning: this expression creates a reference which is immediately dereferenced by the compiler --> src/lib.rs:2836:23 | 2836 | Ok(Self::post(&self) | ^^^^^ help: change this to: `self` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow warning: enclosing `Ok` and `?` operator are unneeded --> src/lib.rs:2853:9 | 2853 | / Ok(Self::post(&self) 2854 | | .endpoint(endpoint) 2855 | | .body(body) 2856 | | .call() 2857 | | .await?) | |____________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_question_mark help: remove the enclosing `Ok` and `?` operator | 2853 ~ Self::post(&self) 2854 | .endpoint(endpoint) 2855 | .body(body) 2856 | .call() 2857 ~ .await | warning: this expression creates a reference which is immediately dereferenced by the compiler --> src/lib.rs:2853:23 | 2853 | Ok(Self::post(&self) | ^^^^^ help: change this to: `self` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow warning: enclosing `Ok` and `?` operator are unneeded --> src/lib.rs:2870:9 | 2870 | / Ok(Self::post(&self) 2871 | | .endpoint(endpoint) 2872 | | .body(body) 2873 | | .call() 2874 | | .await?) | |____________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_question_mark help: remove the enclosing `Ok` and `?` operator | 2870 ~ Self::post(&self) 2871 | .endpoint(endpoint) 2872 | .body(body) 2873 | .call() 2874 ~ .await | warning: this expression creates a reference which is immediately dereferenced by the compiler --> src/lib.rs:2870:23 | 2870 | Ok(Self::post(&self) | ^^^^^ help: change this to: `self` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow warning: enclosing `Ok` and `?` operator are unneeded --> src/lib.rs:2887:9 | 2887 | / Ok(Self::post(&self) 2888 | | .endpoint(endpoint) 2889 | | .body(body) 2890 | | .call() 2891 | | .await?) | |____________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_question_mark help: remove the enclosing `Ok` and `?` operator | 2887 ~ Self::post(&self) 2888 | .endpoint(endpoint) 2889 | .body(body) 2890 | .call() 2891 ~ .await | warning: this expression creates a reference which is immediately dereferenced by the compiler --> src/lib.rs:2887:23 | 2887 | Ok(Self::post(&self) | ^^^^^ help: change this to: `self` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow warning: enclosing `Ok` and `?` operator are unneeded --> src/lib.rs:2906:9 | 2906 | / Ok(Self::post(&self) 2907 | | .endpoint(endpoint) 2908 | | .body(body) 2909 | | .call() 2910 | | .await?) | |____________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_question_mark help: remove the enclosing `Ok` and `?` operator | 2906 ~ Self::post(&self) 2907 | .endpoint(endpoint) 2908 | .body(body) 2909 | .call() 2910 ~ .await | warning: this expression creates a reference which is immediately dereferenced by the compiler --> src/lib.rs:2906:23 | 2906 | Ok(Self::post(&self) | ^^^^^ help: change this to: `self` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow warning: enclosing `Ok` and `?` operator are unneeded --> src/lib.rs:2923:9 | 2923 | / Ok(Self::post(&self) 2924 | | .endpoint(endpoint) 2925 | | .body(body) 2926 | | .call() 2927 | | .await?) | |____________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_question_mark help: remove the enclosing `Ok` and `?` operator | 2923 ~ Self::post(&self) 2924 | .endpoint(endpoint) 2925 | .body(body) 2926 | .call() 2927 ~ .await | warning: this expression creates a reference which is immediately dereferenced by the compiler --> src/lib.rs:2923:23 | 2923 | Ok(Self::post(&self) | ^^^^^ help: change this to: `self` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow warning: enclosing `Ok` and `?` operator are unneeded --> src/lib.rs:2940:9 | 2940 | / Ok(Self::post(&self) 2941 | | .endpoint(endpoint) 2942 | | .body(body) 2943 | | .call() 2944 | | .await?) | |____________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_question_mark help: remove the enclosing `Ok` and `?` operator | 2940 ~ Self::post(&self) 2941 | .endpoint(endpoint) 2942 | .body(body) 2943 | .call() 2944 ~ .await | warning: this expression creates a reference which is immediately dereferenced by the compiler --> src/lib.rs:2940:23 | 2940 | Ok(Self::post(&self) | ^^^^^ help: change this to: `self` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow warning: enclosing `Ok` and `?` operator are unneeded --> src/lib.rs:2959:9 | 2959 | / Ok(Self::post(&self) 2960 | | .endpoint(endpoint) 2961 | | .body(body) 2962 | | .call() 2963 | | .await?) | |____________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_question_mark help: remove the enclosing `Ok` and `?` operator | 2959 ~ Self::post(&self) 2960 | .endpoint(endpoint) 2961 | .body(body) 2962 | .call() 2963 ~ .await | warning: this expression creates a reference which is immediately dereferenced by the compiler --> src/lib.rs:2959:23 | 2959 | Ok(Self::post(&self) | ^^^^^ help: change this to: `self` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow warning: enclosing `Ok` and `?` operator are unneeded --> src/lib.rs:2978:9 | 2978 | / Ok(Self::post(&self) 2979 | | .endpoint(endpoint) 2980 | | .body(body) 2981 | | .call() 2982 | | .await?) | |____________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_question_mark help: remove the enclosing `Ok` and `?` operator | 2978 ~ Self::post(&self) 2979 | .endpoint(endpoint) 2980 | .body(body) 2981 | .call() 2982 ~ .await | warning: this expression creates a reference which is immediately dereferenced by the compiler --> src/lib.rs:2978:23 | 2978 | Ok(Self::post(&self) | ^^^^^ help: change this to: `self` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow warning: enclosing `Ok` and `?` operator are unneeded --> src/lib.rs:2995:9 | 2995 | / Ok(Self::post(&self) 2996 | | .endpoint(endpoint) 2997 | | .body(body) 2998 | | .call() 2999 | | .await?) | |____________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_question_mark help: remove the enclosing `Ok` and `?` operator | 2995 ~ Self::post(&self) 2996 | .endpoint(endpoint) 2997 | .body(body) 2998 | .call() 2999 ~ .await | warning: this expression creates a reference which is immediately dereferenced by the compiler --> src/lib.rs:2995:23 | 2995 | Ok(Self::post(&self) | ^^^^^ help: change this to: `self` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow warning: enclosing `Ok` and `?` operator are unneeded --> src/lib.rs:3012:9 | 3012 | / Ok(Self::post(&self) 3013 | | .endpoint(endpoint) 3014 | | .body(body) 3015 | | .call() 3016 | | .await?) | |____________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_question_mark help: remove the enclosing `Ok` and `?` operator | 3012 ~ Self::post(&self) 3013 | .endpoint(endpoint) 3014 | .body(body) 3015 | .call() 3016 ~ .await | warning: this expression creates a reference which is immediately dereferenced by the compiler --> src/lib.rs:3012:23 | 3012 | Ok(Self::post(&self) | ^^^^^ help: change this to: `self` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow warning: enclosing `Ok` and `?` operator are unneeded --> src/lib.rs:3029:9 | 3029 | / Ok(Self::post(&self) 3030 | | .endpoint(endpoint) 3031 | | .body(body) 3032 | | .call() 3033 | | .await?) | |____________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_question_mark help: remove the enclosing `Ok` and `?` operator | 3029 ~ Self::post(&self) 3030 | .endpoint(endpoint) 3031 | .body(body) 3032 | .call() 3033 ~ .await | warning: this expression creates a reference which is immediately dereferenced by the compiler --> src/lib.rs:3029:23 | 3029 | Ok(Self::post(&self) | ^^^^^ help: change this to: `self` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow warning: enclosing `Ok` and `?` operator are unneeded --> src/lib.rs:3048:9 | 3048 | / Ok(Self::post(&self) 3049 | | .endpoint(endpoint) 3050 | | .body(body) 3051 | | .call() 3052 | | .await?) | |____________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_question_mark help: remove the enclosing `Ok` and `?` operator | 3048 ~ Self::post(&self) 3049 | .endpoint(endpoint) 3050 | .body(body) 3051 | .call() 3052 ~ .await | warning: this expression creates a reference which is immediately dereferenced by the compiler --> src/lib.rs:3048:23 | 3048 | Ok(Self::post(&self) | ^^^^^ help: change this to: `self` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow warning: `ckanaction` (lib) generated 271 warnings (run `cargo clippy --fix --lib -p ckanaction` to apply 271 suggestions) Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.24s --- src/lib.rs | 547 ++++++++++++++++++++++++++--------------------------- 1 file changed, 271 insertions(+), 276 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index 4ef57c0..d168708 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -20,9 +20,8 @@ fn opsert<'a, T: serde::ser::Serialize>( ) { if value.is_some() { map.insert(name, json!(value)); - () - } else { - }; + + } ; } fn hashmap_to_json( @@ -95,11 +94,11 @@ impl CKAN { opsert("limit", limit, &mut map); opsert("offset", offset, &mut map); let body = hashmap_to_json(&map)?; - Ok(Self::post(&self) + Self::post(self) .endpoint(endpoint) .body(body) .call() - .await?) + .await } /// https://docs.ckan.org/en/2.11/api/index.html#ckan.logic.action.get.current_package_list_with_resources @@ -116,11 +115,11 @@ impl CKAN { opsert("offset", offset, &mut map); opsert("page", page, &mut map); let body = hashmap_to_json(&map)?; - Ok(Self::post(&self) + Self::post(self) .endpoint(endpoint) .body(body) .call() - .await?) + .await } /// https://docs.ckan.org/en/2.11/api/index.html#ckan.logic.action.get.member_list @@ -137,11 +136,11 @@ impl CKAN { opsert("object_type", object_type, &mut map); opsert("capacity", capacity, &mut map); let body = hashmap_to_json(&map)?; - Ok(Self::post(&self) + Self::post(self) .endpoint(endpoint) .body(body) .call() - .await?) + .await } /// https://docs.ckan.org/en/2.11/api/index.html#ckan.logic.action.get.package_collaborator_list @@ -156,11 +155,11 @@ impl CKAN { map.insert("id", json!(id)); opsert("capacity", capacity, &mut map); let body = hashmap_to_json(&map)?; - Ok(Self::post(&self) + Self::post(self) .endpoint(endpoint) .body(body) .call() - .await?) + .await } /// https://docs.ckan.org/en/2.11/api/index.html#ckan.logic.action.get.package_collaborator_list_for_user @@ -175,11 +174,11 @@ impl CKAN { map.insert("id", json!(id)); opsert("capacity", capacity, &mut map); let body = hashmap_to_json(&map)?; - Ok(Self::post(&self) + Self::post(self) .endpoint(endpoint) .body(body) .call() - .await?) + .await } /// https://docs.ckan.org/en/2.11/api/index.html#ckan.logic.action.get.group_list @@ -214,11 +213,11 @@ impl CKAN { opsert("include_groups", include_groups, &mut map); opsert("include_users", include_users, &mut map); let body = hashmap_to_json(&map)?; - Ok(Self::post(&self) + Self::post(self) .endpoint(endpoint) .body(body) .call() - .await?) + .await } /// https://docs.ckan.org/en/2.11/api/index.html#ckan.logic.action.get.organization_list @@ -253,11 +252,11 @@ impl CKAN { opsert("include_groups", include_groups, &mut map); opsert("include_users", include_users, &mut map); let body = hashmap_to_json(&map)?; - Ok(Self::post(&self) + Self::post(self) .endpoint(endpoint) .body(body) .call() - .await?) + .await } /// https://docs.ckan.org/en/2.11/api/index.html#ckan.logic.action.get.group_list_authz @@ -272,11 +271,11 @@ impl CKAN { opsert("available_only", available_only, &mut map); opsert("am_member", am_member, &mut map); let body = hashmap_to_json(&map)?; - Ok(Self::post(&self) + Self::post(self) .endpoint(endpoint) .body(body) .call() - .await?) + .await } /// https://docs.ckan.org/en/2.11/api/index.html#ckan.logic.action.get.organization_list_for_user @@ -293,18 +292,18 @@ impl CKAN { opsert("permission", permission, &mut map); opsert("include_dataset_count", include_dataset_count, &mut map); let body = hashmap_to_json(&map)?; - Ok(Self::post(&self) + Self::post(self) .endpoint(endpoint) .body(body) .call() - .await?) + .await } /// https://docs.ckan.org/en/2.11/api/index.html#ckan.logic.action.get.license_list #[builder] pub async fn license_list(&self) -> Result> { let endpoint = self.url.clone() + "/api/3/action/license_list"; - Ok(Self::post(&self).endpoint(endpoint).call().await?) + Self::post(self).endpoint(endpoint).call().await } /// https://docs.ckan.org/en/2.11/api/index.html#ckan.logic.action.get.tag_list @@ -321,11 +320,11 @@ impl CKAN { opsert("vocabulary_id", vocabulary_id, &mut map); opsert("all_fields", all_fields, &mut map); let body = hashmap_to_json(&map)?; - Ok(Self::post(&self) + Self::post(self) .endpoint(endpoint) .body(body) .call() - .await?) + .await } /// https://docs.ckan.org/en/2.11/api/index.html#ckan.logic.action.get.user_list @@ -346,11 +345,11 @@ impl CKAN { opsert("all_fields", all_fields, &mut map); opsert("include_site_user", include_site_user, &mut map); let body = hashmap_to_json(&map)?; - Ok(Self::post(&self) + Self::post(self) .endpoint(endpoint) .body(body) .call() - .await?) + .await } /// https://docs.ckan.org/en/2.11/api/index.html#ckan.logic.action.get.package_relationships_list @@ -367,11 +366,11 @@ impl CKAN { map.insert("id2", json!(id2)); opsert("rel", rel, &mut map); let body = hashmap_to_json(&map)?; - Ok(Self::post(&self) + Self::post(self) .endpoint(endpoint) .body(body) .call() - .await?) + .await } /// https://docs.ckan.org/en/2.11/api/index.html#ckan.logic.action.get.resource_show @@ -384,11 +383,11 @@ impl CKAN { let mut map: HashMap<&str, serde_json::Value> = HashMap::new(); map.insert("id", json!(id)); let body = hashmap_to_json(&map)?; - Ok(Self::post(&self) + Self::post(self) .endpoint(endpoint) .body(body) .call() - .await?) + .await } /// https://docs.ckan.org/en/2.11/api/index.html#ckan.logic.action.get.resource_view_show @@ -401,11 +400,11 @@ impl CKAN { let mut map: HashMap<&str, serde_json::Value> = HashMap::new(); map.insert("id", json!(id)); let body = hashmap_to_json(&map)?; - Ok(Self::post(&self) + Self::post(self) .endpoint(endpoint) .body(body) .call() - .await?) + .await } /// https://docs.ckan.org/en/2.11/api/index.html#ckan.logic.action.get.resource_view_list @@ -418,11 +417,11 @@ impl CKAN { let mut map: HashMap<&str, serde_json::Value> = HashMap::new(); map.insert("id", json!(id)); let body = hashmap_to_json(&map)?; - Ok(Self::post(&self) + Self::post(self) .endpoint(endpoint) .body(body) .call() - .await?) + .await } /// https://docs.ckan.org/en/2.11/api/index.html#ckan.logic.action.get.group_show @@ -449,11 +448,11 @@ impl CKAN { opsert("include_tags", include_tags, &mut map); opsert("include_followers", include_followers, &mut map); let body = hashmap_to_json(&map)?; - Ok(Self::post(&self) + Self::post(self) .endpoint(endpoint) .body(body) .call() - .await?) + .await } /// https://docs.ckan.org/en/2.11/api/index.html#ckan.logic.action.get.organization_show @@ -480,11 +479,11 @@ impl CKAN { opsert("include_tags", include_tags, &mut map); opsert("include_followers", include_followers, &mut map); let body = hashmap_to_json(&map)?; - Ok(Self::post(&self) + Self::post(self) .endpoint(endpoint) .body(body) .call() - .await?) + .await } /// https://docs.ckan.org/en/2.11/api/index.html#ckan.logic.action.get.group_package_show @@ -499,11 +498,11 @@ impl CKAN { map.insert("id", json!(id)); opsert("limit", limit, &mut map); let body = hashmap_to_json(&map)?; - Ok(Self::post(&self) + Self::post(self) .endpoint(endpoint) .body(body) .call() - .await?) + .await } /// https://docs.ckan.org/en/2.11/api/index.html#ckan.logic.action.get.tag_show @@ -520,11 +519,11 @@ impl CKAN { opsert("vocabulary_id", vocabulary_id, &mut map); opsert("include_datasets", include_datasets, &mut map); let body = hashmap_to_json(&map)?; - Ok(Self::post(&self) + Self::post(self) .endpoint(endpoint) .body(body) .call() - .await?) + .await } /// https://docs.ckan.org/en/2.11/api/index.html#ckan.logic.action.get.user_show @@ -545,11 +544,11 @@ impl CKAN { opsert("include_password_hash", include_password_hash, &mut map); opsert("include_plugin_extras", include_plugin_extras, &mut map); let body = hashmap_to_json(&map)?; - Ok(Self::post(&self) + Self::post(self) .endpoint(endpoint) .body(body) .call() - .await?) + .await } /// https://docs.ckan.org/en/2.11/api/index.html#ckan.logic.action.get.package_autocomplete @@ -564,11 +563,11 @@ impl CKAN { map.insert("q", json!(q)); opsert("limit", limit, &mut map); let body = hashmap_to_json(&map)?; - Ok(Self::post(&self) + Self::post(self) .endpoint(endpoint) .body(body) .call() - .await?) + .await } /// https://docs.ckan.org/en/2.11/api/index.html#ckan.logic.action.get.format_autocomplete @@ -583,11 +582,11 @@ impl CKAN { map.insert("q", json!(q)); opsert("limit", limit, &mut map); let body = hashmap_to_json(&map)?; - Ok(Self::post(&self) + Self::post(self) .endpoint(endpoint) .body(body) .call() - .await?) + .await } /// https://docs.ckan.org/en/2.11/api/index.html#ckan.logic.action.get.user_autocomplete @@ -602,11 +601,11 @@ impl CKAN { map.insert("q", json!(q)); opsert("limit", limit, &mut map); let body = hashmap_to_json(&map)?; - Ok(Self::post(&self) + Self::post(self) .endpoint(endpoint) .body(body) .call() - .await?) + .await } /// https://docs.ckan.org/en/2.11/api/index.html#ckan.logic.action.get.group_autocomplete @@ -621,11 +620,11 @@ impl CKAN { map.insert("q", json!(q)); opsert("limit", limit, &mut map); let body = hashmap_to_json(&map)?; - Ok(Self::post(&self) + Self::post(self) .endpoint(endpoint) .body(body) .call() - .await?) + .await } /// https://docs.ckan.org/en/2.11/api/index.html#ckan.logic.action.get.organization_autocomplete @@ -640,11 +639,11 @@ impl CKAN { map.insert("q", json!(q)); opsert("limit", limit, &mut map); let body = hashmap_to_json(&map)?; - Ok(Self::post(&self) + Self::post(self) .endpoint(endpoint) .body(body) .call() - .await?) + .await } /// https://docs.ckan.org/en/2.11/api/index.html#ckan.logic.action.get.package_search @@ -681,11 +680,11 @@ impl CKAN { opsert("include_private", include_private, &mut map); opsert("use_default_schema", use_default_schema, &mut map); let body = hashmap_to_json(&map)?; - Ok(Self::post(&self) + Self::post(self) .endpoint(endpoint) .body(body) .call() - .await?) + .await } /// https://docs.ckan.org/en/2.11/api/index.html#ckan.logic.action.get.resource_search @@ -704,11 +703,11 @@ impl CKAN { opsert("offset", offset, &mut map); opsert("limit", limit, &mut map); let body = hashmap_to_json(&map)?; - Ok(Self::post(&self) + Self::post(self) .endpoint(endpoint) .body(body) .call() - .await?) + .await } /// https://docs.ckan.org/en/2.11/api/index.html#ckan.logic.action.get.tag_search @@ -727,11 +726,11 @@ impl CKAN { opsert("limit", limit, &mut map); opsert("offset", offset, &mut map); let body = hashmap_to_json(&map)?; - Ok(Self::post(&self) + Self::post(self) .endpoint(endpoint) .body(body) .call() - .await?) + .await } /// https://docs.ckan.org/en/2.11/api/index.html#ckan.logic.action.get.tag_autocomplete @@ -750,11 +749,11 @@ impl CKAN { opsert("limit", limit, &mut map); opsert("offset", offset, &mut map); let body = hashmap_to_json(&map)?; - Ok(Self::post(&self) + Self::post(self) .endpoint(endpoint) .body(body) .call() - .await?) + .await } /// https://docs.ckan.org/en/2.11/api/index.html#ckan.logic.action.get.task_status_show @@ -773,11 +772,11 @@ impl CKAN { opsert("task_type", task_type, &mut map); opsert("key", key, &mut map); let body = hashmap_to_json(&map)?; - Ok(Self::post(&self) + Self::post(self) .endpoint(endpoint) .body(body) .call() - .await?) + .await } /// https://docs.ckan.org/en/2.11/api/index.html#ckan.logic.action.get.term_translation_show @@ -792,16 +791,16 @@ impl CKAN { opsert("terms", terms, &mut map); opsert("lang_codes", lang_codes, &mut map); let body = hashmap_to_json(&map)?; - Ok(Self::post(&self) + Self::post(self) .endpoint(endpoint) .body(body) .call() - .await?) + .await } /// https://docs.ckan.org/en/2.11/api/index.html#ckan.logic.action.get.get_site_user #[builder] - pub async fn get_site_user( + pub async fn get_site_user( &self, defer_commit: Option, ) -> Result> { @@ -809,23 +808,23 @@ impl CKAN { let mut map: HashMap<&str, serde_json::Value> = HashMap::new(); opsert("defer_commit", defer_commit, &mut map); let body = hashmap_to_json(&map)?; - Ok(Self::post(&self) + Self::post(self) .endpoint(endpoint) .body(body) .call() - .await?) + .await } /// https://docs.ckan.org/en/2.11/api/index.html#ckan.logic.action.get.status_show pub async fn status_show(&self) -> Result> { let endpoint = self.url.clone() + "/api/3/action/status_show"; - Ok(Self::get(&self, endpoint).await?) + Self::get(self, endpoint).await } /// https://docs.ckan.org/en/2.11/api/index.html#ckan.logic.action.get.vocabulary_list pub async fn vocabulary_list(&self) -> Result> { let endpoint = self.url.clone() + "/api/3/action/vocabulary_list"; - Ok(Self::get(&self, endpoint).await?) + Self::get(self, endpoint).await } /// https://docs.ckan.org/en/2.11/api/index.html#ckan.logic.action.get.vocabulary_show @@ -838,11 +837,11 @@ impl CKAN { let mut map: HashMap<&str, serde_json::Value> = HashMap::new(); map.insert("id", json!(id)); let body = hashmap_to_json(&map)?; - Ok(Self::post(&self) + Self::post(self) .endpoint(endpoint) .body(body) .call() - .await?) + .await } /// https://docs.ckan.org/en/2.11/api/index.html#ckan.logic.action.get.user_follower_count @@ -855,11 +854,11 @@ impl CKAN { let mut map: HashMap<&str, serde_json::Value> = HashMap::new(); map.insert("id", json!(id)); let body = hashmap_to_json(&map)?; - Ok(Self::post(&self) + Self::post(self) .endpoint(endpoint) .body(body) .call() - .await?) + .await } /// https://docs.ckan.org/en/2.11/api/index.html#ckan.logic.action.get.dataset_follower_count @@ -872,11 +871,11 @@ impl CKAN { let mut map: HashMap<&str, serde_json::Value> = HashMap::new(); map.insert("id", json!(id)); let body = hashmap_to_json(&map)?; - Ok(Self::post(&self) + Self::post(self) .endpoint(endpoint) .body(body) .call() - .await?) + .await } /// https://docs.ckan.org/en/2.11/api/index.html#ckan.logic.action.get.group_follower_count @@ -889,11 +888,11 @@ impl CKAN { let mut map: HashMap<&str, serde_json::Value> = HashMap::new(); map.insert("id", json!(id)); let body = hashmap_to_json(&map)?; - Ok(Self::post(&self) + Self::post(self) .endpoint(endpoint) .body(body) .call() - .await?) + .await } /// https://docs.ckan.org/en/2.11/api/index.html#ckan.logic.action.get.organization_follower_count @@ -906,11 +905,11 @@ impl CKAN { let mut map: HashMap<&str, serde_json::Value> = HashMap::new(); map.insert("id", json!(id)); let body = hashmap_to_json(&map)?; - Ok(Self::post(&self) + Self::post(self) .endpoint(endpoint) .body(body) .call() - .await?) + .await } /// https://docs.ckan.org/en/2.11/api/index.html#ckan.logic.action.get.user_follower_list @@ -923,11 +922,11 @@ impl CKAN { let mut map: HashMap<&str, serde_json::Value> = HashMap::new(); map.insert("id", json!(id)); let body = hashmap_to_json(&map)?; - Ok(Self::post(&self) + Self::post(self) .endpoint(endpoint) .body(body) .call() - .await?) + .await } /// https://docs.ckan.org/en/2.11/api/index.html#ckan.logic.action.get.dataset_follower_list @@ -940,11 +939,11 @@ impl CKAN { let mut map: HashMap<&str, serde_json::Value> = HashMap::new(); map.insert("id", json!(id)); let body = hashmap_to_json(&map)?; - Ok(Self::post(&self) + Self::post(self) .endpoint(endpoint) .body(body) .call() - .await?) + .await } /// https://docs.ckan.org/en/2.11/api/index.html#ckan.logic.action.get.group_follower_list @@ -957,11 +956,11 @@ impl CKAN { let mut map: HashMap<&str, serde_json::Value> = HashMap::new(); map.insert("id", json!(id)); let body = hashmap_to_json(&map)?; - Ok(Self::post(&self) + Self::post(self) .endpoint(endpoint) .body(body) .call() - .await?) + .await } /// https://docs.ckan.org/en/2.11/api/index.html#ckan.logic.action.get.am_following_user @@ -974,11 +973,11 @@ impl CKAN { let mut map: HashMap<&str, serde_json::Value> = HashMap::new(); map.insert("id", json!(id)); let body = hashmap_to_json(&map)?; - Ok(Self::post(&self) + Self::post(self) .endpoint(endpoint) .body(body) .call() - .await?) + .await } /// https://docs.ckan.org/en/2.11/api/index.html#ckan.logic.action.get.am_following_dataset @@ -991,11 +990,11 @@ impl CKAN { let mut map: HashMap<&str, serde_json::Value> = HashMap::new(); map.insert("id", json!(id)); let body = hashmap_to_json(&map)?; - Ok(Self::post(&self) + Self::post(self) .endpoint(endpoint) .body(body) .call() - .await?) + .await } /// https://docs.ckan.org/en/2.11/api/index.html#ckan.logic.action.get.am_following_group @@ -1008,11 +1007,11 @@ impl CKAN { let mut map: HashMap<&str, serde_json::Value> = HashMap::new(); map.insert("id", json!(id)); let body = hashmap_to_json(&map)?; - Ok(Self::post(&self) + Self::post(self) .endpoint(endpoint) .body(body) .call() - .await?) + .await } /// https://docs.ckan.org/en/2.11/api/index.html#ckan.logic.action.get.followee_count @@ -1025,11 +1024,11 @@ impl CKAN { let mut map: HashMap<&str, serde_json::Value> = HashMap::new(); map.insert("id", json!(id)); let body = hashmap_to_json(&map)?; - Ok(Self::post(&self) + Self::post(self) .endpoint(endpoint) .body(body) .call() - .await?) + .await } /// https://docs.ckan.org/en/2.11/api/index.html#ckan.logic.action.get.user_followee_count @@ -1042,11 +1041,11 @@ impl CKAN { let mut map: HashMap<&str, serde_json::Value> = HashMap::new(); map.insert("id", json!(id)); let body = hashmap_to_json(&map)?; - Ok(Self::post(&self) + Self::post(self) .endpoint(endpoint) .body(body) .call() - .await?) + .await } /// https://docs.ckan.org/en/2.11/api/index.html#ckan.logic.action.get.dataset_followee_count @@ -1059,11 +1058,11 @@ impl CKAN { let mut map: HashMap<&str, serde_json::Value> = HashMap::new(); map.insert("id", json!(id)); let body = hashmap_to_json(&map)?; - Ok(Self::post(&self) + Self::post(self) .endpoint(endpoint) .body(body) .call() - .await?) + .await } /// https://docs.ckan.org/en/2.11/api/index.html#ckan.logic.action.get.group_followee_count @@ -1076,11 +1075,11 @@ impl CKAN { let mut map: HashMap<&str, serde_json::Value> = HashMap::new(); map.insert("id", json!(id)); let body = hashmap_to_json(&map)?; - Ok(Self::post(&self) + Self::post(self) .endpoint(endpoint) .body(body) .call() - .await?) + .await } /// https://docs.ckan.org/en/2.11/api/index.html#ckan.logic.action.get.organization_followee_count @@ -1093,11 +1092,11 @@ impl CKAN { let mut map: HashMap<&str, serde_json::Value> = HashMap::new(); map.insert("id", json!(id)); let body = hashmap_to_json(&map)?; - Ok(Self::post(&self) + Self::post(self) .endpoint(endpoint) .body(body) .call() - .await?) + .await } /// https://docs.ckan.org/en/2.11/api/index.html#ckan.logic.action.get.followee_list @@ -1112,11 +1111,11 @@ impl CKAN { map.insert("id", json!(id)); opsert("q", q, &mut map); let body = hashmap_to_json(&map)?; - Ok(Self::post(&self) + Self::post(self) .endpoint(endpoint) .body(body) .call() - .await?) + .await } /// https://docs.ckan.org/en/2.11/api/index.html#ckan.logic.action.get.user_followee_list @@ -1129,11 +1128,11 @@ impl CKAN { let mut map: HashMap<&str, serde_json::Value> = HashMap::new(); map.insert("id", json!(id)); let body = hashmap_to_json(&map)?; - Ok(Self::post(&self) + Self::post(self) .endpoint(endpoint) .body(body) .call() - .await?) + .await } /// https://docs.ckan.org/en/2.11/api/index.html#ckan.logic.action.get.dataset_followee_list @@ -1146,11 +1145,11 @@ impl CKAN { let mut map: HashMap<&str, serde_json::Value> = HashMap::new(); map.insert("id", json!(id)); let body = hashmap_to_json(&map)?; - Ok(Self::post(&self) + Self::post(self) .endpoint(endpoint) .body(body) .call() - .await?) + .await } /// https://docs.ckan.org/en/2.11/api/index.html#ckan.logic.action.get.group_followee_list @@ -1163,11 +1162,11 @@ impl CKAN { let mut map: HashMap<&str, serde_json::Value> = HashMap::new(); map.insert("id", json!(id)); let body = hashmap_to_json(&map)?; - Ok(Self::post(&self) + Self::post(self) .endpoint(endpoint) .body(body) .call() - .await?) + .await } /// https://docs.ckan.org/en/2.11/api/index.html#ckan.logic.action.get.organization_followee_list @@ -1180,11 +1179,11 @@ impl CKAN { let mut map: HashMap<&str, serde_json::Value> = HashMap::new(); map.insert("id", json!(id)); let body = hashmap_to_json(&map)?; - Ok(Self::post(&self) + Self::post(self) .endpoint(endpoint) .body(body) .call() - .await?) + .await } /// https://docs.ckan.org/en/2.11/api/index.html#ckan.logic.action.get.member_roles_list @@ -1197,11 +1196,11 @@ impl CKAN { let mut map: HashMap<&str, serde_json::Value> = HashMap::new(); opsert("group_type", group_type, &mut map); let body = hashmap_to_json(&map)?; - Ok(Self::post(&self) + Self::post(self) .endpoint(endpoint) .body(body) .call() - .await?) + .await } /// https://docs.ckan.org/en/2.11/api/index.html#ckan.logic.action.get.help_show @@ -1214,11 +1213,11 @@ impl CKAN { let mut map: HashMap<&str, serde_json::Value> = HashMap::new(); map.insert("name", json!(name)); let body = hashmap_to_json(&map)?; - Ok(Self::post(&self) + Self::post(self) .endpoint(endpoint) .body(body) .call() - .await?) + .await } /// https://docs.ckan.org/en/2.11/api/index.html#ckan.logic.action.get.config_option_show @@ -1231,11 +1230,11 @@ impl CKAN { let mut map: HashMap<&str, serde_json::Value> = HashMap::new(); map.insert("key", json!(key)); let body = hashmap_to_json(&map)?; - Ok(Self::post(&self) + Self::post(self) .endpoint(endpoint) .body(body) .call() - .await?) + .await } /// https://docs.ckan.org/en/2.11/api/index.html#ckan.logic.action.get.config_option_list @@ -1243,7 +1242,7 @@ impl CKAN { &self, ) -> Result> { let endpoint = self.url.clone() + "/api/3/action/config_option_list"; - Ok(Self::get(&self, endpoint).await?) + Self::get(self, endpoint).await } /// https://docs.ckan.org/en/2.11/api/index.html#ckan.logic.action.get.job_list @@ -1256,11 +1255,11 @@ impl CKAN { let mut map: HashMap<&str, serde_json::Value> = HashMap::new(); opsert("queues", queues, &mut map); let body = hashmap_to_json(&map)?; - Ok(Self::post(&self) + Self::post(self) .endpoint(endpoint) .body(body) .call() - .await?) + .await } /// https://docs.ckan.org/en/2.11/api/index.html#ckan.logic.action.get.job_show @@ -1273,11 +1272,11 @@ impl CKAN { let mut map: HashMap<&str, serde_json::Value> = HashMap::new(); map.insert("id", json!(id)); let body = hashmap_to_json(&map)?; - Ok(Self::post(&self) + Self::post(self) .endpoint(endpoint) .body(body) .call() - .await?) + .await } /// https://docs.ckan.org/en/2.11/api/index.html#ckan.logic.action.get.api_token_list @@ -1290,11 +1289,11 @@ impl CKAN { let mut map: HashMap<&str, serde_json::Value> = HashMap::new(); map.insert("user_id", json!(user_id)); let body = hashmap_to_json(&map)?; - Ok(Self::post(&self) + Self::post(self) .endpoint(endpoint) .body(body) .call() - .await?) + .await } /// https://docs.ckan.org/en/2.11/api/index.html#ckan.logic.action.create.package_create @@ -1352,8 +1351,8 @@ impl CKAN { let mut custom_map: HashMap = HashMap::new(); opsert("groups", groups, &mut map); opsert("owner_org", owner_org, &mut map); - if let Some(custom) = custom_fields { - if custom.is_object() { + if let Some(custom) = custom_fields + && custom.is_object() { let custom_temp_map = custom.as_object().unwrap(); custom_map.extend( custom_temp_map @@ -1361,18 +1360,17 @@ impl CKAN { .map(|item| (item.0.to_owned(), item.1.to_owned())), ); } - } map.extend( custom_map .iter() .map(|item| (item.0.as_str(), item.1.to_owned())), ); let body = hashmap_to_json(&map)?; - Ok(Self::post(&self) + Self::post(self) .endpoint(endpoint) .body(body) .call() - .await?) + .await } /// https://docs.ckan.org/en/2.11/api/index.html#ckan.logic.action.create.resource_create @@ -1413,12 +1411,12 @@ impl CKAN { opsert("cache_last_updated", cache_last_updated, &mut map); let body = hashmap_to_json(&map)?; - Ok(Self::post(&self) + Self::post(self) .endpoint(endpoint) .body(body) .maybe_upload(upload) .call() - .await?) + .await } /// https://docs.ckan.org/en/2.11/api/index.html#ckan.logic.action.create.resource_view_create @@ -1439,11 +1437,11 @@ impl CKAN { map.insert("view_type", json!(view_type)); opsert("config", config, &mut map); let body = hashmap_to_json(&map)?; - Ok(Self::post(&self) + Self::post(self) .endpoint(endpoint) .body(body) .call() - .await?) + .await } /// https://docs.ckan.org/en/2.11/api/index.html#ckan.logic.action.create.create_default_resource_views @@ -1460,11 +1458,11 @@ impl CKAN { opsert("package", package, &mut map); opsert("create_datastore_views", create_datastore_views, &mut map); let body = hashmap_to_json(&map)?; - Ok(Self::post(&self) + Self::post(self) .endpoint(endpoint) .body(body) .call() - .await?) + .await } /// https://docs.ckan.org/en/2.11/api/index.html#ckan.logic.action.create.package_create_default_resource_views @@ -1479,11 +1477,11 @@ impl CKAN { map.insert("package", package); opsert("create_datastore_views", create_datastore_views, &mut map); let body = hashmap_to_json(&map)?; - Ok(Self::post(&self) + Self::post(self) .endpoint(endpoint) .body(body) .call() - .await?) + .await } /// https://docs.ckan.org/en/2.11/api/index.html#ckan.logic.action.create.package_relationship_create @@ -1502,11 +1500,11 @@ impl CKAN { map.insert("type", json!(_type)); opsert("comment", comment, &mut map); let body = hashmap_to_json(&map)?; - Ok(Self::post(&self) + Self::post(self) .endpoint(endpoint) .body(body) .call() - .await?) + .await } /// https://docs.ckan.org/en/2.11/api/index.html#ckan.logic.action.create.member_create @@ -1525,11 +1523,11 @@ impl CKAN { map.insert("object_type", json!(object_type)); map.insert("capacity", json!(capacity)); let body = hashmap_to_json(&map)?; - Ok(Self::post(&self) + Self::post(self) .endpoint(endpoint) .body(body) .call() - .await?) + .await } /// https://docs.ckan.org/en/2.11/api/index.html#ckan.logic.action.create.package_collaborator_create @@ -1546,11 +1544,11 @@ impl CKAN { map.insert("user_id", json!(user_id)); map.insert("capacity", json!(capacity)); let body = hashmap_to_json(&map)?; - Ok(Self::post(&self) + Self::post(self) .endpoint(endpoint) .body(body) .call() - .await?) + .await } /// https://docs.ckan.org/en/2.11/api/index.html#ckan.logic.action.create.group_create @@ -1585,11 +1583,11 @@ impl CKAN { opsert("groups", groups, &mut map); opsert("users", users, &mut map); let body = hashmap_to_json(&map)?; - Ok(Self::post(&self) + Self::post(self) .endpoint(endpoint) .body(body) .call() - .await?) + .await } /// https://docs.ckan.org/en/2.11/api/index.html#ckan.logic.action.create.organization_create @@ -1620,11 +1618,11 @@ impl CKAN { opsert("packages", packages, &mut map); opsert("users", users, &mut map); let body = hashmap_to_json(&map)?; - Ok(Self::post(&self) + Self::post(self) .endpoint(endpoint) .body(body) .call() - .await?) + .await } /// https://docs.ckan.org/en/2.11/api/index.html#ckan.logic.action.create.user_create @@ -1653,11 +1651,11 @@ impl CKAN { opsert("plugin_extras", plugin_extras, &mut map); opsert("with_apitoken", with_apitoken, &mut map); let body = hashmap_to_json(&map)?; - Ok(Self::post(&self) + Self::post(self) .endpoint(endpoint) .body(body) .call() - .await?) + .await } /// https://docs.ckan.org/en/2.11/api/index.html#ckan.logic.action.create.user_invite @@ -1674,11 +1672,11 @@ impl CKAN { map.insert("group_id", json!(group_id)); map.insert("role", json!(role)); let body = hashmap_to_json(&map)?; - Ok(Self::post(&self) + Self::post(self) .endpoint(endpoint) .body(body) .call() - .await?) + .await } /// https://docs.ckan.org/en/2.11/api/index.html#ckan.logic.action.create.vocabulary_create @@ -1693,11 +1691,11 @@ impl CKAN { map.insert("name", json!(name)); map.insert("tags", json!(tags)); let body = hashmap_to_json(&map)?; - Ok(Self::post(&self) + Self::post(self) .endpoint(endpoint) .body(body) .call() - .await?) + .await } /// https://docs.ckan.org/en/2.11/api/index.html#ckan.logic.action.create.tag_create @@ -1712,11 +1710,11 @@ impl CKAN { map.insert("name", json!(name)); map.insert("vocabulary_id", json!(vocabulary_id)); let body = hashmap_to_json(&map)?; - Ok(Self::post(&self) + Self::post(self) .endpoint(endpoint) .body(body) .call() - .await?) + .await } /// https://docs.ckan.org/en/2.11/api/index.html#ckan.logic.action.create.follow_user @@ -1729,11 +1727,11 @@ impl CKAN { let mut map: HashMap<&str, serde_json::Value> = HashMap::new(); map.insert("id", json!(id)); let body = hashmap_to_json(&map)?; - Ok(Self::post(&self) + Self::post(self) .endpoint(endpoint) .body(body) .call() - .await?) + .await } /// https://docs.ckan.org/en/2.11/api/index.html#ckan.logic.action.create.follow_dataset @@ -1746,11 +1744,11 @@ impl CKAN { let mut map: HashMap<&str, serde_json::Value> = HashMap::new(); map.insert("id", json!(id)); let body = hashmap_to_json(&map)?; - Ok(Self::post(&self) + Self::post(self) .endpoint(endpoint) .body(body) .call() - .await?) + .await } /// https://docs.ckan.org/en/2.11/api/index.html#ckan.logic.action.create.group_member_create @@ -1767,11 +1765,11 @@ impl CKAN { map.insert("username", json!(username)); map.insert("role", json!(role)); let body = hashmap_to_json(&map)?; - Ok(Self::post(&self) + Self::post(self) .endpoint(endpoint) .body(body) .call() - .await?) + .await } /// https://docs.ckan.org/en/2.11/api/index.html#ckan.logic.action.create.organization_member_create @@ -1788,11 +1786,11 @@ impl CKAN { map.insert("username", json!(username)); map.insert("role", json!(role)); let body = hashmap_to_json(&map)?; - Ok(Self::post(&self) + Self::post(self) .endpoint(endpoint) .body(body) .call() - .await?) + .await } /// https://docs.ckan.org/en/2.11/api/index.html#ckan.logic.action.create.follow_group @@ -1805,11 +1803,11 @@ impl CKAN { let mut map: HashMap<&str, serde_json::Value> = HashMap::new(); map.insert("id", json!(id)); let body = hashmap_to_json(&map)?; - Ok(Self::post(&self) + Self::post(self) .endpoint(endpoint) .body(body) .call() - .await?) + .await } /// https://docs.ckan.org/en/2.11/api/index.html#ckan.logic.action.create.api_token_create @@ -1824,11 +1822,11 @@ impl CKAN { map.insert("user", json!(user)); map.insert("name", json!(name)); let body = hashmap_to_json(&map)?; - Ok(Self::post(&self) + Self::post(self) .endpoint(endpoint) .body(body) .call() - .await?) + .await } /// https://docs.ckan.org/en/2.11/api/index.html#ckan.logic.action.update.resource_update @@ -1871,12 +1869,12 @@ impl CKAN { opsert("cache_last_updated", cache_last_updated, &mut map); let body = hashmap_to_json(&map)?; - Ok(Self::post(&self) + Self::post(self) .endpoint(endpoint) .body(body) .maybe_upload(upload) .call() - .await?) + .await } /// https://docs.ckan.org/en/2.11/api/index.html#ckan.logic.action.update.resource_view_update @@ -1899,11 +1897,11 @@ impl CKAN { map.insert("view_type", json!(view_type)); opsert("config", config, &mut map); let body = hashmap_to_json(&map)?; - Ok(Self::post(&self) + Self::post(self) .endpoint(endpoint) .body(body) .call() - .await?) + .await } /// https://docs.ckan.org/en/2.11/api/index.html#ckan.logic.action.update.resource_view_reorder @@ -1918,11 +1916,11 @@ impl CKAN { map.insert("id", json!(id)); map.insert("order", json!(order)); let body = hashmap_to_json(&map)?; - Ok(Self::post(&self) + Self::post(self) .endpoint(endpoint) .body(body) .call() - .await?) + .await } /// https://docs.ckan.org/en/2.11/api/index.html#ckan.logic.action.update.package_update @@ -1982,8 +1980,8 @@ impl CKAN { let mut custom_map: HashMap = HashMap::new(); opsert("groups", groups, &mut map); opsert("owner_org", owner_org, &mut map); - if let Some(custom) = custom_fields { - if custom.is_object() { + if let Some(custom) = custom_fields + && custom.is_object() { let custom_temp_map = custom.as_object().unwrap(); custom_map.extend( custom_temp_map @@ -1991,18 +1989,17 @@ impl CKAN { .map(|item| (item.0.to_owned(), item.1.to_owned())), ); } - } map.extend( custom_map .iter() .map(|item| (item.0.as_str(), item.1.to_owned())), ); let body = hashmap_to_json(&map)?; - Ok(Self::post(&self) + Self::post(self) .endpoint(endpoint) .body(body) .call() - .await?) + .await } /// https://docs.ckan.org/en/2.11/api/index.html#ckan.logic.action.update.package_revise @@ -2021,11 +2018,11 @@ impl CKAN { map.insert("update", update); opsert("include", include, &mut map); let body = hashmap_to_json(&map)?; - Ok(Self::post(&self) + Self::post(self) .endpoint(endpoint) .body(body) .call() - .await?) + .await } /// https://docs.ckan.org/en/2.11/api/index.html#ckan.logic.action.update.package_resource_reorder @@ -2040,11 +2037,11 @@ impl CKAN { map.insert("id", json!(id)); map.insert("order", json!(order)); let body = hashmap_to_json(&map)?; - Ok(Self::post(&self) + Self::post(self) .endpoint(endpoint) .body(body) .call() - .await?) + .await } /// https://docs.ckan.org/en/2.11/api/index.html#ckan.logic.action.update.package_relationship_update @@ -2063,11 +2060,11 @@ impl CKAN { map.insert("type", json!(_type)); opsert("comment", comment, &mut map); let body = hashmap_to_json(&map)?; - Ok(Self::post(&self) + Self::post(self) .endpoint(endpoint) .body(body) .call() - .await?) + .await } /// https://docs.ckan.org/en/2.11/api/index.html#ckan.logic.action.update.group_update @@ -2102,11 +2099,11 @@ impl CKAN { opsert("groups", groups, &mut map); opsert("users", users, &mut map); let body = hashmap_to_json(&map)?; - Ok(Self::post(&self) + Self::post(self) .endpoint(endpoint) .body(body) .call() - .await?) + .await } /// https://docs.ckan.org/en/2.11/api/index.html#ckan.logic.action.update.organization_update @@ -2135,11 +2132,11 @@ impl CKAN { opsert("extras", extras, &mut map); opsert("users", users, &mut map); let body = hashmap_to_json(&map)?; - Ok(Self::post(&self) + Self::post(self) .endpoint(endpoint) .body(body) .call() - .await?) + .await } /// https://docs.ckan.org/en/2.11/api/index.html#ckan.logic.action.update.user_update @@ -2168,11 +2165,11 @@ impl CKAN { opsert("plugin_extras", plugin_extras, &mut map); opsert("with_apitoken", with_apitoken, &mut map); let body = hashmap_to_json(&map)?; - Ok(Self::post(&self) + Self::post(self) .endpoint(endpoint) .body(body) .call() - .await?) + .await } /// https://docs.ckan.org/en/2.11/api/index.html#ckan.logic.action.update.task_status_update @@ -2201,11 +2198,11 @@ impl CKAN { opsert("last_updated", last_updated, &mut map); opsert("error", error, &mut map); let body = hashmap_to_json(&map)?; - Ok(Self::post(&self) + Self::post(self) .endpoint(endpoint) .body(body) .call() - .await?) + .await } /// https://docs.ckan.org/en/2.11/api/index.html#ckan.logic.action.update.task_status_update_many @@ -2218,11 +2215,11 @@ impl CKAN { let mut map: HashMap<&str, serde_json::Value> = HashMap::new(); map.insert("data", json!(data)); let body = hashmap_to_json(&map)?; - Ok(Self::post(&self) + Self::post(self) .endpoint(endpoint) .body(body) .call() - .await?) + .await } /// https://docs.ckan.org/en/2.11/api/index.html#ckan.logic.action.update.term_translation_update @@ -2239,11 +2236,11 @@ impl CKAN { map.insert("term_translation", json!(term_translation)); map.insert("lang_code", json!(lang_code)); let body = hashmap_to_json(&map)?; - Ok(Self::post(&self) + Self::post(self) .endpoint(endpoint) .body(body) .call() - .await?) + .await } /// https://docs.ckan.org/en/2.11/api/index.html#ckan.logic.action.update.term_translation_update_many @@ -2256,11 +2253,11 @@ impl CKAN { let mut map: HashMap<&str, serde_json::Value> = HashMap::new(); map.insert("data", json!(data)); let body = hashmap_to_json(&map)?; - Ok(Self::post(&self) + Self::post(self) .endpoint(endpoint) .body(body) .call() - .await?) + .await } /// https://docs.ckan.org/en/2.11/api/index.html#ckan.logic.action.update.vocabulary_update @@ -2277,11 +2274,11 @@ impl CKAN { map.insert("name", json!(name)); map.insert("tags", json!(tags)); let body = hashmap_to_json(&map)?; - Ok(Self::post(&self) + Self::post(self) .endpoint(endpoint) .body(body) .call() - .await?) + .await } /// https://docs.ckan.org/en/2.11/api/index.html#ckan.logic.action.update.package_owner_org_update @@ -2296,11 +2293,11 @@ impl CKAN { map.insert("id", json!(id)); map.insert("organization_id", json!(organization_id)); let body = hashmap_to_json(&map)?; - Ok(Self::post(&self) + Self::post(self) .endpoint(endpoint) .body(body) .call() - .await?) + .await } /// https://docs.ckan.org/en/2.11/api/index.html#ckan.logic.action.update.bulk_update_private @@ -2315,11 +2312,11 @@ impl CKAN { map.insert("datasets", json!(datasets)); map.insert("org_id", json!(org_id)); let body = hashmap_to_json(&map)?; - Ok(Self::post(&self) + Self::post(self) .endpoint(endpoint) .body(body) .call() - .await?) + .await } /// https://docs.ckan.org/en/2.11/api/index.html#ckan.logic.action.update.bulk_update_public @@ -2334,11 +2331,11 @@ impl CKAN { map.insert("datasets", json!(datasets)); map.insert("org_id", json!(org_id)); let body = hashmap_to_json(&map)?; - Ok(Self::post(&self) + Self::post(self) .endpoint(endpoint) .body(body) .call() - .await?) + .await } /// https://docs.ckan.org/en/2.11/api/index.html#ckan.logic.action.update.bulk_update_delete @@ -2353,11 +2350,11 @@ impl CKAN { map.insert("datasets", json!(datasets)); map.insert("org_id", json!(org_id)); let body = hashmap_to_json(&map)?; - Ok(Self::post(&self) + Self::post(self) .endpoint(endpoint) .body(body) .call() - .await?) + .await } // TODO: Verify proper parameters @@ -2370,8 +2367,8 @@ impl CKAN { let endpoint = self.url.clone() + "/api/3/action/config_option_update"; let mut map: HashMap<&str, serde_json::Value> = HashMap::new(); let mut custom_map: HashMap = HashMap::new(); - if let Some(options_obj) = options { - if options_obj.is_object() { + if let Some(options_obj) = options + && options_obj.is_object() { let custom_temp_map = options_obj.as_object().unwrap(); custom_map.extend( custom_temp_map @@ -2379,18 +2376,17 @@ impl CKAN { .map(|item| (item.0.to_owned(), item.1.to_owned())), ); } - } map.extend( custom_map .iter() .map(|item| (item.0.as_str(), item.1.to_owned())), ); let body = hashmap_to_json(&map)?; - Ok(Self::post(&self) + Self::post(self) .endpoint(endpoint) .body(body) .call() - .await?) + .await } /// https://docs.ckan.org/en/2.11/api/index.html#ckan.logic.action.patch.package_patch @@ -2450,8 +2446,8 @@ impl CKAN { let mut custom_map: HashMap = HashMap::new(); opsert("groups", groups, &mut map); opsert("owner_org", owner_org, &mut map); - if let Some(custom) = custom_fields { - if custom.is_object() { + if let Some(custom) = custom_fields + && custom.is_object() { let custom_temp_map = custom.as_object().unwrap(); custom_map.extend( custom_temp_map @@ -2459,18 +2455,17 @@ impl CKAN { .map(|item| (item.0.to_owned(), item.1.to_owned())), ); } - } map.extend( custom_map .iter() .map(|item| (item.0.as_str(), item.1.to_owned())), ); let body = hashmap_to_json(&map)?; - Ok(Self::post(&self) + Self::post(self) .endpoint(endpoint) .body(body) .call() - .await?) + .await } /// https://docs.ckan.org/en/2.11/api/index.html#ckan.logic.action.patch.resource_patch @@ -2513,12 +2508,12 @@ impl CKAN { opsert("cache_last_updated", cache_last_updated, &mut map); let body = hashmap_to_json(&map)?; - Ok(Self::post(&self) + Self::post(self) .endpoint(endpoint) .body(body) .maybe_upload(upload) .call() - .await?) + .await } /// https://docs.ckan.org/en/2.11/api/index.html#ckan.logic.action.update.group_patch @@ -2553,11 +2548,11 @@ impl CKAN { opsert("groups", groups, &mut map); opsert("users", users, &mut map); let body = hashmap_to_json(&map)?; - Ok(Self::post(&self) + Self::post(self) .endpoint(endpoint) .body(body) .call() - .await?) + .await } /// https://docs.ckan.org/en/2.11/api/index.html#ckan.logic.action.patch.organization_patch @@ -2586,11 +2581,11 @@ impl CKAN { opsert("extras", extras, &mut map); opsert("users", users, &mut map); let body = hashmap_to_json(&map)?; - Ok(Self::post(&self) + Self::post(self) .endpoint(endpoint) .body(body) .call() - .await?) + .await } /// https://docs.ckan.org/en/2.11/api/index.html#ckan.logic.action.patch.user_patch @@ -2619,11 +2614,11 @@ impl CKAN { opsert("plugin_extras", plugin_extras, &mut map); opsert("with_apitoken", with_apitoken, &mut map); let body = hashmap_to_json(&map)?; - Ok(Self::post(&self) + Self::post(self) .endpoint(endpoint) .body(body) .call() - .await?) + .await } /// https://docs.ckan.org/en/2.11/api/index.html#ckan.logic.action.delete.user_delete @@ -2636,11 +2631,11 @@ impl CKAN { let mut map: HashMap<&str, serde_json::Value> = HashMap::new(); map.insert("id", json!(id)); let body = hashmap_to_json(&map)?; - Ok(Self::post(&self) + Self::post(self) .endpoint(endpoint) .body(body) .call() - .await?) + .await } /// https://docs.ckan.org/en/2.11/api/index.html#ckan.logic.action.delete.package_delete @@ -2653,11 +2648,11 @@ impl CKAN { let mut map: HashMap<&str, serde_json::Value> = HashMap::new(); map.insert("id", json!(id)); let body = hashmap_to_json(&map)?; - Ok(Self::post(&self) + Self::post(self) .endpoint(endpoint) .body(body) .call() - .await?) + .await } /// https://docs.ckan.org/en/2.11/api/index.html#ckan.logic.action.delete.dataset_purge @@ -2670,11 +2665,11 @@ impl CKAN { let mut map: HashMap<&str, serde_json::Value> = HashMap::new(); map.insert("id", json!(id)); let body = hashmap_to_json(&map)?; - Ok(Self::post(&self) + Self::post(self) .endpoint(endpoint) .body(body) .call() - .await?) + .await } /// https://docs.ckan.org/en/2.11/api/index.html#ckan.logic.action.delete.resource_delete @@ -2687,11 +2682,11 @@ impl CKAN { let mut map: HashMap<&str, serde_json::Value> = HashMap::new(); map.insert("id", json!(id)); let body = hashmap_to_json(&map)?; - Ok(Self::post(&self) + Self::post(self) .endpoint(endpoint) .body(body) .call() - .await?) + .await } /// https://docs.ckan.org/en/2.11/api/index.html#ckan.logic.action.delete.resource_view_delete @@ -2704,11 +2699,11 @@ impl CKAN { let mut map: HashMap<&str, serde_json::Value> = HashMap::new(); map.insert("id", json!(id)); let body = hashmap_to_json(&map)?; - Ok(Self::post(&self) + Self::post(self) .endpoint(endpoint) .body(body) .call() - .await?) + .await } /// https://docs.ckan.org/en/2.11/api/index.html#ckan.logic.action.delete.resource_view_clear @@ -2721,11 +2716,11 @@ impl CKAN { let mut map: HashMap<&str, serde_json::Value> = HashMap::new(); opsert("view_types", view_types, &mut map); let body = hashmap_to_json(&map)?; - Ok(Self::post(&self) + Self::post(self) .endpoint(endpoint) .body(body) .call() - .await?) + .await } /// https://docs.ckan.org/en/2.11/api/index.html#ckan.logic.action.delete.package_relationship_delete @@ -2742,11 +2737,11 @@ impl CKAN { map.insert("object", json!(object)); map.insert("type", json!(_type)); let body = hashmap_to_json(&map)?; - Ok(Self::post(&self) + Self::post(self) .endpoint(endpoint) .body(body) .call() - .await?) + .await } /// https://docs.ckan.org/en/2.11/api/index.html#ckan.logic.action.delete.member_delete @@ -2763,11 +2758,11 @@ impl CKAN { map.insert("object", json!(object)); map.insert("object_type", json!(object_type)); let body = hashmap_to_json(&map)?; - Ok(Self::post(&self) + Self::post(self) .endpoint(endpoint) .body(body) .call() - .await?) + .await } /// https://docs.ckan.org/en/2.11/api/index.html#ckan.logic.action.delete.package_collaborator_delete @@ -2782,11 +2777,11 @@ impl CKAN { map.insert("id", json!(id)); map.insert("user_id", json!(user_id)); let body = hashmap_to_json(&map)?; - Ok(Self::post(&self) + Self::post(self) .endpoint(endpoint) .body(body) .call() - .await?) + .await } /// https://docs.ckan.org/en/2.11/api/index.html#ckan.logic.action.delete.group_delete @@ -2799,11 +2794,11 @@ impl CKAN { let mut map: HashMap<&str, serde_json::Value> = HashMap::new(); map.insert("id", json!(id)); let body = hashmap_to_json(&map)?; - Ok(Self::post(&self) + Self::post(self) .endpoint(endpoint) .body(body) .call() - .await?) + .await } /// https://docs.ckan.org/en/2.11/api/index.html#ckan.logic.action.delete.organization_delete @@ -2816,11 +2811,11 @@ impl CKAN { let mut map: HashMap<&str, serde_json::Value> = HashMap::new(); map.insert("id", json!(id)); let body = hashmap_to_json(&map)?; - Ok(Self::post(&self) + Self::post(self) .endpoint(endpoint) .body(body) .call() - .await?) + .await } /// https://docs.ckan.org/en/2.11/api/index.html#ckan.logic.action.delete.group_purge @@ -2833,11 +2828,11 @@ impl CKAN { let mut map: HashMap<&str, serde_json::Value> = HashMap::new(); map.insert("id", json!(id)); let body = hashmap_to_json(&map)?; - Ok(Self::post(&self) + Self::post(self) .endpoint(endpoint) .body(body) .call() - .await?) + .await } /// https://docs.ckan.org/en/2.11/api/index.html#ckan.logic.action.delete.organization_purge @@ -2850,11 +2845,11 @@ impl CKAN { let mut map: HashMap<&str, serde_json::Value> = HashMap::new(); map.insert("id", json!(id)); let body = hashmap_to_json(&map)?; - Ok(Self::post(&self) + Self::post(self) .endpoint(endpoint) .body(body) .call() - .await?) + .await } /// https://docs.ckan.org/en/2.11/api/index.html#ckan.logic.action.delete.task_status_delete @@ -2867,11 +2862,11 @@ impl CKAN { let mut map: HashMap<&str, serde_json::Value> = HashMap::new(); map.insert("id", json!(id)); let body = hashmap_to_json(&map)?; - Ok(Self::post(&self) + Self::post(self) .endpoint(endpoint) .body(body) .call() - .await?) + .await } /// https://docs.ckan.org/en/2.11/api/index.html#ckan.logic.action.delete.vocabulary_delete @@ -2884,11 +2879,11 @@ impl CKAN { let mut map: HashMap<&str, serde_json::Value> = HashMap::new(); map.insert("id", json!(id)); let body = hashmap_to_json(&map)?; - Ok(Self::post(&self) + Self::post(self) .endpoint(endpoint) .body(body) .call() - .await?) + .await } /// https://docs.ckan.org/en/2.11/api/index.html#ckan.logic.action.delete.tag_delete @@ -2903,11 +2898,11 @@ impl CKAN { map.insert("id", json!(id)); map.insert("vocabulary_id", json!(vocabulary_id)); let body = hashmap_to_json(&map)?; - Ok(Self::post(&self) + Self::post(self) .endpoint(endpoint) .body(body) .call() - .await?) + .await } /// https://docs.ckan.org/en/2.11/api/index.html#ckan.logic.action.delete.unfollow_user @@ -2920,11 +2915,11 @@ impl CKAN { let mut map: HashMap<&str, serde_json::Value> = HashMap::new(); map.insert("id", json!(id)); let body = hashmap_to_json(&map)?; - Ok(Self::post(&self) + Self::post(self) .endpoint(endpoint) .body(body) .call() - .await?) + .await } /// https://docs.ckan.org/en/2.11/api/index.html#ckan.logic.action.delete.unfollow_dataset @@ -2937,11 +2932,11 @@ impl CKAN { let mut map: HashMap<&str, serde_json::Value> = HashMap::new(); map.insert("id", json!(id)); let body = hashmap_to_json(&map)?; - Ok(Self::post(&self) + Self::post(self) .endpoint(endpoint) .body(body) .call() - .await?) + .await } /// https://docs.ckan.org/en/2.11/api/index.html#ckan.logic.action.delete.group_member_delete @@ -2956,11 +2951,11 @@ impl CKAN { map.insert("id", json!(id)); map.insert("username", json!(username)); let body = hashmap_to_json(&map)?; - Ok(Self::post(&self) + Self::post(self) .endpoint(endpoint) .body(body) .call() - .await?) + .await } /// https://docs.ckan.org/en/2.11/api/index.html#ckan.logic.action.delete.organization_member_delete @@ -2975,11 +2970,11 @@ impl CKAN { map.insert("id", json!(id)); map.insert("username", json!(username)); let body = hashmap_to_json(&map)?; - Ok(Self::post(&self) + Self::post(self) .endpoint(endpoint) .body(body) .call() - .await?) + .await } /// https://docs.ckan.org/en/2.11/api/index.html#ckan.logic.action.delete.unfollow_group @@ -2992,11 +2987,11 @@ impl CKAN { let mut map: HashMap<&str, serde_json::Value> = HashMap::new(); map.insert("id", json!(id)); let body = hashmap_to_json(&map)?; - Ok(Self::post(&self) + Self::post(self) .endpoint(endpoint) .body(body) .call() - .await?) + .await } /// https://docs.ckan.org/en/2.11/api/index.html#ckan.logic.action.delete.job_clear @@ -3009,11 +3004,11 @@ impl CKAN { let mut map: HashMap<&str, serde_json::Value> = HashMap::new(); opsert("queues", queues, &mut map); let body = hashmap_to_json(&map)?; - Ok(Self::post(&self) + Self::post(self) .endpoint(endpoint) .body(body) .call() - .await?) + .await } /// https://docs.ckan.org/en/2.11/api/index.html#ckan.logic.action.delete.job_cancel @@ -3026,11 +3021,11 @@ impl CKAN { let mut map: HashMap<&str, serde_json::Value> = HashMap::new(); map.insert("id", json!(id)); let body = hashmap_to_json(&map)?; - Ok(Self::post(&self) + Self::post(self) .endpoint(endpoint) .body(body) .call() - .await?) + .await } /// https://docs.ckan.org/en/2.11/api/index.html#ckan.logic.action.delete.api_token_revoke @@ -3045,10 +3040,10 @@ impl CKAN { map.insert("token", json!(token)); opsert("jti", jti, &mut map); let body = hashmap_to_json(&map)?; - Ok(Self::post(&self) + Self::post(self) .endpoint(endpoint) .body(body) .call() - .await?) + .await } }