remove extra getters

This commit is contained in:
yggverse 2024-11-28 00:53:06 +02:00
parent 649d8f92f6
commit 3ce272cd70
7 changed files with 48 additions and 112 deletions

View file

@ -13,7 +13,7 @@ use std::rc::Rc;
// Main
pub struct Request {
widget: Rc<Widget>,
pub widget: Rc<Widget>,
}
impl Request {
@ -90,12 +90,8 @@ impl Request {
// Getters
pub fn widget(&self) -> &Rc<Widget> {
&self.widget
}
pub fn uri(&self) -> Option<Uri> {
match Uri::parse(&self.widget.gobject().text(), UriFlags::NONE) {
match Uri::parse(&self.widget.entry.text(), UriFlags::NONE) {
Ok(uri) => Some(uri),
_ => None,
}