diff --git a/application/src/request.rs b/application/src/request.rs index b7c4688..1e96978 100644 --- a/application/src/request.rs +++ b/application/src/request.rs @@ -3,10 +3,8 @@ use crate::request::models::{Current, GithubRelease, State}; use crate::request::notification::Notification; use crate::request::versioning::{SemverVersionComparer, VersionComparer}; use crate::{Print, Settings}; -use reqwest::get; -use reqwest::header::{ACCEPT, ACCEPT_ENCODING, ACCEPT_LANGUAGE}; +use reqwest::header::ACCEPT; use std::cmp::Ordering; -use std::io::Read; use std::time::Duration; pub fn init<'a>( @@ -57,12 +55,9 @@ impl<'a> RequestHandler<'a> { .build() .unwrap(); - let mut return_json = client + let return_json = client .get(&latest_release_api_url) .header(ACCEPT, "application/vnd.github.v3+json") - // .header("X-Github-Api-Version", "2022-11-28") - // .header(ACCEPT_LANGUAGE, "en-US") - // .header(ACCEPT_ENCODING, "gzip, deflate, br") .send() .unwrap(); @@ -89,7 +84,7 @@ impl<'a> RequestHandler<'a> { send_alerts_for.push(State::new(release, current.clone())); } else { println!( - "Current version for {:?} is alligned with or larger than CVS", + "Current version for {:?} is aligned with or larger than CVS", current ); } @@ -143,10 +138,9 @@ JOIN VcsTypes V ON O.vcs_type = V.vcs_type"; } pub mod notification { - use crate::request::models::{Current, State}; + use crate::request::models::State; use lettre::transport::smtp::authentication::Credentials; use lettre::{Message, SmtpTransport, Transport}; - use std::thread::current; pub trait Notification { fn send(&self, currents: &Vec);