diff --git a/src/widgets/mod.rs b/src/widgets/mod.rs index 2248c48..e2fe6f3 100644 --- a/src/widgets/mod.rs +++ b/src/widgets/mod.rs @@ -111,10 +111,10 @@ impl Default for TabSelectionType { } /// Allows the user to write a custom homepage -pub enum HomepageType { - Url(String), +pub enum HomepageType<'a> { + Url(&'a str), /// This is rendered with html - Custom(String), + Custom(&'a str), } pub struct IcyBrowser { @@ -160,7 +160,7 @@ impl IcyBrowser { pub fn with_homepage(mut self, homepage: HomepageType) -> Self { match homepage { HomepageType::Url(url) => { - self.home = Url::parse(&url).expect("Failed to parse homepage as a url!"); + self.home = Url::parse(url).expect("Failed to parse homepage as a url!"); } HomepageType::Custom(_) => todo!(), }