From f2d2068bcf5f8ecc5324af726608b646d3e6b864 Mon Sep 17 00:00:00 2001 From: neon_arch Date: Thu, 5 Sep 2024 22:10:02 +0530 Subject: [PATCH] :zap: perf: replace `String` & vectors with `Cow` data types (#603) --- src/models/server_models.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/models/server_models.rs b/src/models/server_models.rs index eca252e..7a12ee5 100644 --- a/src/models/server_models.rs +++ b/src/models/server_models.rs @@ -11,7 +11,7 @@ use super::parser_models::Style; pub struct SearchParams { /// It stores the search parameter option `q` (or query in simple words) /// of the search url. - pub q: Option, + pub q: Option>, /// It stores the search parameter `page` (or pageno in simple words) /// of the search url. pub page: Option, @@ -29,7 +29,7 @@ pub struct Cookie<'a> { /// It stores the colorscheme name used for the website theme. pub colorscheme: Cow<'a, str>, /// It stores the user selected upstream search engines selected from the UI. - pub engines: Cow<'a, Vec>>, + pub engines: Cow<'a, [Cow<'a, str>]>, /// It stores the user selected safe search level from the UI. pub safe_search_level: u8, }