Private
Public Access
1
0

Clippy, warnings fix

This commit is contained in:
2024-06-14 20:26:56 -07:00
parent cabd3b502a
commit da36d9da91
3 changed files with 7 additions and 7 deletions

View File

@@ -1,10 +1,10 @@
extern crate hyper;
extern crate serde;
use std::{borrow::Cow, default, path::PathBuf, str};
use std::{path::PathBuf, str};
use log::{error};
use hyper::{client::ResponseFuture, Body, Client, Method, Request, Uri};
use hyper::{Body, Client, Method, Request, Uri};
use async_trait::async_trait;
use serde::{de::DeserializeOwned, Deserialize, Serialize};
@@ -101,8 +101,8 @@ impl APIInterface for HTTPAPIClient {
impl HTTPAPIClient {
pub fn new(base_url: Uri, credentials: Option<Credentials>) -> HTTPAPIClient {
HTTPAPIClient {
base_url: base_url,
credentials: credentials,
base_url,
credentials,
auth_token: Option::None,
client: Client::new(),
}

View File

@@ -64,8 +64,8 @@ impl JwtToken {
exp.parse().unwrap()
});
let timestamp = chrono::NaiveDateTime::from_timestamp_opt(exp, 0).unwrap();
let expiration_date = DateTime::<Utc>::from_utc(timestamp, Utc);
let timestamp = DateTime::from_timestamp(exp, 0).unwrap().naive_utc();
let expiration_date = DateTime::from_naive_utc_and_offset(timestamp, Utc);
Ok(JwtToken {
header,

View File

@@ -24,7 +24,7 @@ impl TestClient {
impl APIInterface for TestClient {
type Error = TestError;
async fn authenticate(&mut self, credentials: Credentials) -> Result<JwtToken, Self::Error> {
async fn authenticate(&mut self, _credentials: Credentials) -> Result<JwtToken, Self::Error> {
Ok(JwtToken::dummy())
}