Run cargo fmt

This commit is contained in:
Tokarak 2024-10-20 18:56:23 +01:00
parent 7d422242be
commit 77fa67299c
3 changed files with 4 additions and 3 deletions

View file

@ -31,6 +31,7 @@ const REDDIT_SHORT_URL_BASE_HOST: &str = "redd.it";
const ALTERNATIVE_REDDIT_URL_BASE: &str = "https://www.reddit.com";
const ALTERNATIVE_REDDIT_URL_BASE_HOST: &str = "www.reddit.com";
// CLIENT and VERIFY_HTTPS are initialised in main.rs
pub static CLIENT: OnceLock<Client<HttpsConnector<HttpConnector>>> = OnceLock::new();
pub static VERIFY_HTTPS: OnceLock<bool> = OnceLock::new();
@ -58,7 +59,7 @@ pub fn generate_client(https_verification: bool) -> Client<HttpsConnector<HttpCo
// If https verification is disabled for debug purposes, create a custom ClientConfig
#[cfg(feature = "no-https-verification")]
let https = if ! https_verification {
let https = if !https_verification {
log::warn!("HTTPS verification is disabled.");
use rustls::ClientConfig;
use std::sync::Arc;

View file

@ -1,8 +1,8 @@
use crate::{
client::VERIFY_HTTPS,
config::{Config, CONFIG},
server::RequestExt,
utils::{ErrorTemplate, Preferences},
client::VERIFY_HTTPS,
};
use build_html::{Container, Html, HtmlContainer, Table};
use hyper::{http::Error, Body, Request, Response};

View file

@ -167,7 +167,7 @@ async fn main() {
let matches = cmd.get_matches_mut();
#[cfg(not(feature = "no-https-verification"))]
if ! matches.get_flag("no-https-verification") {
if !matches.get_flag("no-https-verification") {
cmd
.error(
clap::error::ErrorKind::InvalidValue,