0
0
mirror of https://github.com/neon-mmd/websurfx.git synced 2024-11-22 14:08:23 -05:00

🧹 chore: make github actions happy (#205)

This commit is contained in:
neon_arch 2023-09-12 17:59:33 +03:00
parent fb231de416
commit 1a222217c4
3 changed files with 11 additions and 14 deletions

9
src/cache/error.rs vendored
View File

@ -5,15 +5,12 @@ use std::fmt;
use redis::RedisError; use redis::RedisError;
/// A custom error type used for handling redis async pool associated errors. /// A custom error type used for handling redis async pool associated errors.
///
/// This enum provides variants three different categories of errors:
/// * `RedisError` - This variant handles all errors related to `RedisError`,
/// * `PoolExhaustionWithConnectionDropError` - This variant handles the error
/// which occurs when all the connections in the connection pool return a connection
/// dropped redis error.
#[derive(Debug)] #[derive(Debug)]
pub enum PoolError { pub enum PoolError {
/// This variant handles all errors related to `RedisError`,
RedisError(RedisError), RedisError(RedisError),
/// This variant handles the errors which occurs when all the connections
/// in the connection pool return a connection dropped redis error.
PoolExhaustionWithConnectionDropError, PoolExhaustionWithConnectionDropError,
} }

View File

@ -133,9 +133,8 @@ impl SearchResults {
/// and stores it into a vector of `SearchResult` structs. /// and stores it into a vector of `SearchResult` structs.
/// * `page_query` - Takes an argument of current page`s search query `q` provided in /// * `page_query` - Takes an argument of current page`s search query `q` provided in
/// the search url. /// the search url.
/// * `empty_result_set` - Takes a boolean which indicates that no engines gave a result for the /// * `engine_errors_info` - Takes an array of structs which contains information regarding
/// given search query. /// which engines failed with their names, reason and their severity color name.
/// * ``
pub fn new( pub fn new(
results: Vec<SearchResult>, results: Vec<SearchResult>,
page_query: &str, page_query: &str,

View File

@ -230,7 +230,8 @@ async fn results(
// UI and use that. // UI and use that.
let mut results: SearchResults = match req.cookie("appCookie") { let mut results: SearchResults = match req.cookie("appCookie") {
Some(cookie_value) => { Some(cookie_value) => {
let cookie_value: Cookie = serde_json::from_str(cookie_value.name_value().1)?; let cookie_value: Cookie<'_> =
serde_json::from_str(cookie_value.name_value().1)?;
let engines: Vec<EngineHandler> = cookie_value let engines: Vec<EngineHandler> = cookie_value
.engines .engines