Commit 0c7cab24 authored by Bilal Elmoussaoui's avatar Bilal Elmoussaoui

make clippy happy

parent 59d6e0f0
...@@ -29,7 +29,7 @@ mod imp { ...@@ -29,7 +29,7 @@ mod imp {
impl ObjectImpl for Application {} impl ObjectImpl for Application {}
impl ApplicationImpl for Application { impl ApplicationImpl for Application {
fn activate(&self, application: &Self::Type) { fn activate(&self, application: &Self::Type) {
let window = Window::new(&application); let window = Window::new(application);
application.add_window(&window); application.add_window(&window);
window.present(); window.present();
self.window.set(window.downgrade()).unwrap(); self.window.set(window.downgrade()).unwrap();
...@@ -100,6 +100,7 @@ glib::wrapper! { ...@@ -100,6 +100,7 @@ glib::wrapper! {
} }
impl Application { impl Application {
#[allow(clippy::new_without_default)]
pub fn new() -> Self { pub fn new() -> Self {
glib::Object::new(&[ glib::Object::new(&[
("application-id", &config::APP_ID), ("application-id", &config::APP_ID),
......
...@@ -14,14 +14,10 @@ fn main() { ...@@ -14,14 +14,10 @@ fn main() {
pretty_env_logger::init(); pretty_env_logger::init();
// Prepare i18n // Prepare i18n
setlocale(LocaleCategory::LcAll, ""); setlocale(LocaleCategory::LcAll, "");
bindtextdomain(GETTEXT_PACKAGE, LOCALEDIR).expect(&format!( bindtextdomain(GETTEXT_PACKAGE, LOCALEDIR)
"Unable to bind text domain for {}", .unwrap_or_else(|_| panic!("Unable to bind text domain for {}", GETTEXT_PACKAGE));
GETTEXT_PACKAGE textdomain(GETTEXT_PACKAGE)
)); .unwrap_or_else(|_| panic!("Unable to switch to text domain {}", GETTEXT_PACKAGE));
textdomain(GETTEXT_PACKAGE).expect(&format!(
"Unable to switch to text domain {}",
GETTEXT_PACKAGE
));
glib::set_application_name(&gettext("Tour")); glib::set_application_name(&gettext("Tour"));
glib::set_prgname(Some("Tour")); glib::set_prgname(Some("Tour"));
......
...@@ -34,6 +34,7 @@ mod imp { ...@@ -34,6 +34,7 @@ mod imp {
sender: Sender<Action>, sender: Sender<Action>,
} }
#[allow(clippy::derivable_impls)]
impl Default for WelcomePageWidget { impl Default for WelcomePageWidget {
fn default() -> Self { fn default() -> Self {
#[cfg(feature = "video")] #[cfg(feature = "video")]
...@@ -191,6 +192,7 @@ glib::wrapper! { ...@@ -191,6 +192,7 @@ glib::wrapper! {
} }
impl WelcomePageWidget { impl WelcomePageWidget {
#[allow(clippy::new_without_default)]
pub fn new() -> Self { pub fn new() -> Self {
glib::Object::new(&[]).unwrap() glib::Object::new(&[]).unwrap()
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment