Spaces:
Running
Running
neon_arch
commited on
Commit
·
f2d2068
1
Parent(s):
b1bcf41
:zap: perf: replace `String` & vectors with `Cow` data types (#603)
Browse files
src/models/server_models.rs
CHANGED
@@ -11,7 +11,7 @@ use super::parser_models::Style;
|
|
11 |
pub struct SearchParams {
|
12 |
/// It stores the search parameter option `q` (or query in simple words)
|
13 |
/// of the search url.
|
14 |
-
pub q: Option<
|
15 |
/// It stores the search parameter `page` (or pageno in simple words)
|
16 |
/// of the search url.
|
17 |
pub page: Option<u32>,
|
@@ -29,7 +29,7 @@ pub struct Cookie<'a> {
|
|
29 |
/// It stores the colorscheme name used for the website theme.
|
30 |
pub colorscheme: Cow<'a, str>,
|
31 |
/// It stores the user selected upstream search engines selected from the UI.
|
32 |
-
pub engines: Cow<'a,
|
33 |
/// It stores the user selected safe search level from the UI.
|
34 |
pub safe_search_level: u8,
|
35 |
}
|
|
|
11 |
pub struct SearchParams {
|
12 |
/// It stores the search parameter option `q` (or query in simple words)
|
13 |
/// of the search url.
|
14 |
+
pub q: Option<Cow<'static, str>>,
|
15 |
/// It stores the search parameter `page` (or pageno in simple words)
|
16 |
/// of the search url.
|
17 |
pub page: Option<u32>,
|
|
|
29 |
/// It stores the colorscheme name used for the website theme.
|
30 |
pub colorscheme: Cow<'a, str>,
|
31 |
/// It stores the user selected upstream search engines selected from the UI.
|
32 |
+
pub engines: Cow<'a, [Cow<'a, str>]>,
|
33 |
/// It stores the user selected safe search level from the UI.
|
34 |
pub safe_search_level: u8,
|
35 |
}
|