XFFXFF commited on
Commit
cecffe4
1 Parent(s): ff32515

make format happy

Browse files
src/cache/mod.rs CHANGED
@@ -1 +1 @@
1
- pub mod cacher;
 
1
+ pub mod cacher;
src/search_results_handler/aggregation_models.rs CHANGED
@@ -116,7 +116,7 @@ impl RawSearchResult {
116
  }
117
  }
118
 
119
- /// A named struct to store, serialize, deserialize the all the search results scraped and
120
  /// aggregated from the upstream search engines.
121
  ///
122
  /// # Fields
 
116
  }
117
  }
118
 
119
+ /// A named struct to store, serialize, deserialize the all the search results scraped and
120
  /// aggregated from the upstream search engines.
121
  ///
122
  /// # Fields
src/server/routes.rs CHANGED
@@ -81,10 +81,10 @@ pub async fn search(
81
  .insert_header(("location", "/"))
82
  .finish())
83
  } else {
84
- let page_url: String; // Declare the page_url variable without initializing it
85
 
86
  // ...
87
-
88
  let page = match params.page {
89
  Some(page_number) => {
90
  if page_number <= 1 {
@@ -98,7 +98,7 @@ pub async fn search(
98
  "http://{}:{}/search?q={}&page={}",
99
  config.binding_ip_addr, config.port, query, page_number
100
  );
101
-
102
  page_number
103
  }
104
  }
@@ -110,11 +110,11 @@ pub async fn search(
110
  req.uri(),
111
  1
112
  );
113
-
114
  1
115
  }
116
  };
117
-
118
  // fetch the cached results json.
119
  let cached_results_json = redis_cache.cached_results_json(&page_url);
120
  // check if fetched results was indeed fetched or it was an error and if so
 
81
  .insert_header(("location", "/"))
82
  .finish())
83
  } else {
84
+ let page_url: String; // Declare the page_url variable without initializing it
85
 
86
  // ...
87
+
88
  let page = match params.page {
89
  Some(page_number) => {
90
  if page_number <= 1 {
 
98
  "http://{}:{}/search?q={}&page={}",
99
  config.binding_ip_addr, config.port, query, page_number
100
  );
101
+
102
  page_number
103
  }
104
  }
 
110
  req.uri(),
111
  1
112
  );
113
+
114
  1
115
  }
116
  };
117
+
118
  // fetch the cached results json.
119
  let cached_results_json = redis_cache.cached_results_json(&page_url);
120
  // check if fetched results was indeed fetched or it was an error and if so