neon_arch commited on
Commit
c60fdb8
·
1 Parent(s): 1a22221

🧹 chore: make github actions happy (#205)

Browse files
Files changed (2) hide show
  1. src/config/parser.rs +1 -1
  2. src/server/routes.rs +4 -0
src/config/parser.rs CHANGED
@@ -34,7 +34,7 @@ pub struct Config {
34
  pub threads: u8,
35
  /// It stores configuration options for the ratelimiting middleware.
36
  pub rate_limiter: RateLimiter,
37
- /// It stores the level of safe search to be used for restricting content in the
38
  /// search results.
39
  pub safe_search: u8,
40
  }
 
34
  pub threads: u8,
35
  /// It stores configuration options for the ratelimiting middleware.
36
  pub rate_limiter: RateLimiter,
37
+ /// It stores the level of safe search to be used for restricting content in the
38
  /// search results.
39
  pub safe_search: u8,
40
  }
src/server/routes.rs CHANGED
@@ -33,6 +33,8 @@ struct SearchParams {
33
  /// It stores the search parameter `page` (or pageno in simple words)
34
  /// of the search url.
35
  page: Option<u32>,
 
 
36
  safesearch: Option<u8>,
37
  }
38
 
@@ -275,6 +277,8 @@ async fn results(
275
  }
276
  }
277
 
 
 
278
  fn is_match_from_filter_list(
279
  file_path: &str,
280
  query: &str,
 
33
  /// It stores the search parameter `page` (or pageno in simple words)
34
  /// of the search url.
35
  page: Option<u32>,
36
+ /// It stores the search parameter `safesearch` (or safe search level in simple words) of the
37
+ /// search url.
38
  safesearch: Option<u8>,
39
  }
40
 
 
277
  }
278
  }
279
 
280
+ /// A helper function which checks whether the search query contains any keywords which should be
281
+ /// disallowed/allowed based on the regex based rules present in the blocklist and allowlist files.
282
  fn is_match_from_filter_list(
283
  file_path: &str,
284
  query: &str,