From 5e4f44296638d7f1f2aa9f17a7ef5412cfb85ddd Mon Sep 17 00:00:00 2001 From: yggverse Date: Fri, 13 Dec 2024 00:39:40 +0200 Subject: [PATCH] use const api for None values --- src/app/browser.rs | 4 ++-- .../window/tab/item/identity/gemini/widget/form/file.rs | 2 +- .../window/tab/item/page/content/text/gemini/reader.rs | 8 ++++---- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/app/browser.rs b/src/app/browser.rs index 90f46bfa..da4163ed 100644 --- a/src/app/browser.rs +++ b/src/app/browser.rs @@ -80,8 +80,8 @@ impl Browser { let profile = profile.clone(); move || { FileLauncher::new(Some(&File::for_path(profile.config_path.as_path()))).launch( - None::<>k::Window>, - None::<&Cancellable>, + gtk::Window::NONE, + Cancellable::NONE, |result| { if let Err(error) = result { println!("{error}") diff --git a/src/app/browser/window/tab/item/identity/gemini/widget/form/file.rs b/src/app/browser/window/tab/item/identity/gemini/widget/form/file.rs index 81ab870c..095f78cf 100644 --- a/src/app/browser/window/tab/item/identity/gemini/widget/form/file.rs +++ b/src/app/browser/window/tab/item/identity/gemini/widget/form/file.rs @@ -60,7 +60,7 @@ impl File { .filters(&filters) .default_filter(&filter_pem) .build() - .open(None::<&Window>, None::<&Cancellable>, { + .open(Window::NONE, Cancellable::NONE, { let widget_action = widget_action.clone(); let button = button.clone(); let pem = pem.clone(); diff --git a/src/app/browser/window/tab/item/page/content/text/gemini/reader.rs b/src/app/browser/window/tab/item/page/content/text/gemini/reader.rs index 43562f58..a4d39287 100644 --- a/src/app/browser/window/tab/item/page/content/text/gemini/reader.rs +++ b/src/app/browser/window/tab/item/page/content/text/gemini/reader.rs @@ -350,8 +350,8 @@ impl Reader { } // Scheme not supported, delegate _ => UriLauncher::new(&uri.to_str()).launch( - None::<&Window>, - None::<&Cancellable>, + Window::NONE, + Cancellable::NONE, |result| { if let Err(error) = result { println!("{error}") @@ -394,8 +394,8 @@ impl Reader { } // Scheme not supported, delegate _ => UriLauncher::new(&uri.to_str()).launch( - None::<&Window>, - None::<&Cancellable>, + Window::NONE, + Cancellable::NONE, |result| { if let Err(e) = result { println!("{e}")