Skip to content

Commit 6000bff

Browse files
committed
change homepage type from string to str
1 parent 872d182 commit 6000bff

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/widgets/mod.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -111,10 +111,10 @@ impl Default for TabSelectionType {
111111
}
112112

113113
/// Allows the user to write a custom homepage
114-
pub enum HomepageType {
115-
Url(String),
114+
pub enum HomepageType<'a> {
115+
Url(&'a str),
116116
/// This is rendered with html
117-
Custom(String),
117+
Custom(&'a str),
118118
}
119119

120120
pub struct IcyBrowser<Engine: BrowserEngine> {
@@ -160,7 +160,7 @@ impl<Engine: BrowserEngine> IcyBrowser<Engine> {
160160
pub fn with_homepage(mut self, homepage: HomepageType) -> Self {
161161
match homepage {
162162
HomepageType::Url(url) => {
163-
self.home = Url::parse(&url).expect("Failed to parse homepage as a url!");
163+
self.home = Url::parse(url).expect("Failed to parse homepage as a url!");
164164
}
165165
HomepageType::Custom(_) => todo!(),
166166
}

0 commit comments

Comments
 (0)