Skip to content

Commit

Permalink
Run cargo fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
Tokarak committed Oct 20, 2024
1 parent 7d42224 commit 77fa672
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion src/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion src/instance_info.rs
Original file line number Diff line number Diff line change
@@ -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};
Expand Down
2 changes: 1 addition & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 77fa672

Please sign in to comment.