mirror of
https://github.com/YGGverse/Yoda.git
synced 2025-02-03 23:14:13 +00:00
remove extra clone, use references
This commit is contained in:
parent
879fe7a6f6
commit
2962049926
@ -237,11 +237,8 @@ impl Page {
|
|||||||
let title = gformat!("Titan input");
|
let title = gformat!("Titan input");
|
||||||
|
|
||||||
// Toggle input form
|
// Toggle input form
|
||||||
self.input.set_new_titan(
|
self.input
|
||||||
self.tab_action.clone(),
|
.set_new_titan(&self.tab_action, &uri, Some(&title));
|
||||||
uri.clone(),
|
|
||||||
Some(&title),
|
|
||||||
);
|
|
||||||
|
|
||||||
// Update meta
|
// Update meta
|
||||||
self.meta.set_status(status).set_title(&title);
|
self.meta.set_status(status).set_title(&title);
|
||||||
@ -443,10 +440,7 @@ impl Page {
|
|||||||
|
|
||||||
// Begin new socket request
|
// Begin new socket request
|
||||||
self.client.gemini.request_async(
|
self.client.gemini.request_async(
|
||||||
match uri.scheme().as_str() {
|
Request::gemini(uri.clone()),
|
||||||
"titan" => Request::titan(uri.clone(), Vec::new(), None, None), // @TODO
|
|
||||||
_ => Request::gemini(uri.clone())
|
|
||||||
},
|
|
||||||
Priority::DEFAULT,
|
Priority::DEFAULT,
|
||||||
cancellable.clone(),
|
cancellable.clone(),
|
||||||
// Search for user certificate match request
|
// Search for user certificate match request
|
||||||
|
@ -66,7 +66,7 @@ impl Input {
|
|||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn set_new_titan(&self, action: Rc<TabAction>, base: Uri, title: Option<&str>) {
|
pub fn set_new_titan(&self, action: &Rc<TabAction>, base: &Uri, title: Option<&str>) {
|
||||||
self.widget
|
self.widget
|
||||||
.update(Some(&Titan::build(action, base, title).widget.g_box));
|
.update(Some(&Titan::build(action, base, title).widget.g_box));
|
||||||
}
|
}
|
||||||
|
@ -24,7 +24,7 @@ impl Titan {
|
|||||||
// Constructors
|
// Constructors
|
||||||
|
|
||||||
/// Build new `Self`
|
/// Build new `Self`
|
||||||
pub fn build(_tab_action: Rc<TabAction>, _base: Uri, title: Option<&str>) -> Self {
|
pub fn build(_tab_action: &Rc<TabAction>, _base: &Uri, title: Option<&str>) -> Self {
|
||||||
// Init local actions
|
// Init local actions
|
||||||
let action_update = SimpleAction::new(&uuid_string_random(), None);
|
let action_update = SimpleAction::new(&uuid_string_random(), None);
|
||||||
let action_send = SimpleAction::new(&uuid_string_random(), None);
|
let action_send = SimpleAction::new(&uuid_string_random(), None);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user