neon_arch commited on
Commit
1a22221
1 Parent(s): fb231de

🧹 chore: make github actions happy (#205)

Browse files
src/cache/error.rs CHANGED
@@ -5,15 +5,12 @@ use std::fmt;
5
  use redis::RedisError;
6
 
7
  /// A custom error type used for handling redis async pool associated errors.
8
- ///
9
- /// This enum provides variants three different categories of errors:
10
- /// * `RedisError` - This variant handles all errors related to `RedisError`,
11
- /// * `PoolExhaustionWithConnectionDropError` - This variant handles the error
12
- /// which occurs when all the connections in the connection pool return a connection
13
- /// dropped redis error.
14
  #[derive(Debug)]
15
  pub enum PoolError {
 
16
  RedisError(RedisError),
 
 
17
  PoolExhaustionWithConnectionDropError,
18
  }
19
 
 
5
  use redis::RedisError;
6
 
7
  /// A custom error type used for handling redis async pool associated errors.
 
 
 
 
 
 
8
  #[derive(Debug)]
9
  pub enum PoolError {
10
+ /// This variant handles all errors related to `RedisError`,
11
  RedisError(RedisError),
12
+ /// This variant handles the errors which occurs when all the connections
13
+ /// in the connection pool return a connection dropped redis error.
14
  PoolExhaustionWithConnectionDropError,
15
  }
16
 
src/results/aggregation_models.rs CHANGED
@@ -114,12 +114,12 @@ pub struct SearchResults {
114
  /// Stores the information on which engines failed with their engine name
115
  /// and the type of error that caused it.
116
  pub engine_errors_info: Vec<EngineErrorInfo>,
117
- /// Stores the flag option which holds the check value that the following
118
- /// search query was disallowed when the safe search level set to 4 and it
119
  /// was present in the `Blocklist` file.
120
  pub disallowed: bool,
121
- /// Stores the flag option which holds the check value that the following
122
- /// search query was filtered when the safe search level set to 3 and it
123
  /// was present in the `Blocklist` file.
124
  pub filtered: bool,
125
  }
@@ -133,9 +133,8 @@ impl SearchResults {
133
  /// and stores it into a vector of `SearchResult` structs.
134
  /// * `page_query` - Takes an argument of current page`s search query `q` provided in
135
  /// the search url.
136
- /// * `empty_result_set` - Takes a boolean which indicates that no engines gave a result for the
137
- /// given search query.
138
- /// * ``
139
  pub fn new(
140
  results: Vec<SearchResult>,
141
  page_query: &str,
 
114
  /// Stores the information on which engines failed with their engine name
115
  /// and the type of error that caused it.
116
  pub engine_errors_info: Vec<EngineErrorInfo>,
117
+ /// Stores the flag option which holds the check value that the following
118
+ /// search query was disallowed when the safe search level set to 4 and it
119
  /// was present in the `Blocklist` file.
120
  pub disallowed: bool,
121
+ /// Stores the flag option which holds the check value that the following
122
+ /// search query was filtered when the safe search level set to 3 and it
123
  /// was present in the `Blocklist` file.
124
  pub filtered: bool,
125
  }
 
133
  /// and stores it into a vector of `SearchResult` structs.
134
  /// * `page_query` - Takes an argument of current page`s search query `q` provided in
135
  /// the search url.
136
+ /// * `engine_errors_info` - Takes an array of structs which contains information regarding
137
+ /// which engines failed with their names, reason and their severity color name.
 
138
  pub fn new(
139
  results: Vec<SearchResult>,
140
  page_query: &str,
src/server/routes.rs CHANGED
@@ -230,7 +230,8 @@ async fn results(
230
  // UI and use that.
231
  let mut results: SearchResults = match req.cookie("appCookie") {
232
  Some(cookie_value) => {
233
- let cookie_value: Cookie = serde_json::from_str(cookie_value.name_value().1)?;
 
234
 
235
  let engines: Vec<EngineHandler> = cookie_value
236
  .engines
 
230
  // UI and use that.
231
  let mut results: SearchResults = match req.cookie("appCookie") {
232
  Some(cookie_value) => {
233
+ let cookie_value: Cookie<'_> =
234
+ serde_json::from_str(cookie_value.name_value().1)?;
235
 
236
  let engines: Vec<EngineHandler> = cookie_value
237
  .engines