diff --git a/src/ilias.rs b/src/ilias.rs index 27b972f..4ffb25a 100644 --- a/src/ilias.rs +++ b/src/ilias.rs @@ -5,7 +5,6 @@ use std::{collections::HashMap, error::Error as _, io::Write, sync::Arc}; use anyhow::{anyhow, Context, Result}; use cookie_store::CookieStore; use once_cell::sync::Lazy; -use regex::Regex; use reqwest::{Client, IntoUrl, Proxy, Url}; use reqwest_cookie_store::CookieStoreMutex; use scraper::{ElementRef, Html, Selector}; @@ -223,7 +222,7 @@ impl ILIAS { unreachable!() } - pub async fn is_error_response(html: &Html) { + pub fn is_error_response(html: &Html) -> bool { html.select(&ALERT_DANGER).next().is_some() } diff --git a/src/main.rs b/src/main.rs index ba5a236..3bd8b0d 100644 --- a/src/main.rs +++ b/src/main.rs @@ -3,7 +3,6 @@ use anyhow::{anyhow, Context, Result}; use futures::future::{self, Either}; use futures::StreamExt; -use ignore::gitignore::Gitignore; use indicatif::{ProgressDrawTarget, ProgressStyle}; use structopt::StructOpt; use tokio::fs;