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

make clippy happy

parent 59d6e0f0
......@@ -29,7 +29,7 @@ mod imp {
impl ObjectImpl for Application {}
impl ApplicationImpl for Application {
fn activate(&self, application: &Self::Type) {
let window = Window::new(&application);
let window = Window::new(application);
application.add_window(&window);
window.present();
self.window.set(window.downgrade()).unwrap();
......@@ -100,6 +100,7 @@ glib::wrapper! {
}
impl Application {
#[allow(clippy::new_without_default)]
pub fn new() -> Self {
glib::Object::new(&[
("application-id", &config::APP_ID),
......
......@@ -14,14 +14,10 @@ fn main() {
pretty_env_logger::init();
// Prepare i18n
setlocale(LocaleCategory::LcAll, "");
bindtextdomain(GETTEXT_PACKAGE, LOCALEDIR).expect(&format!(
"Unable to bind text domain for {}",
GETTEXT_PACKAGE
));
textdomain(GETTEXT_PACKAGE).expect(&format!(
"Unable to switch to text domain {}",
GETTEXT_PACKAGE
));
bindtextdomain(GETTEXT_PACKAGE, LOCALEDIR)
.unwrap_or_else(|_| panic!("Unable to bind text domain for {}", GETTEXT_PACKAGE));
textdomain(GETTEXT_PACKAGE)
.unwrap_or_else(|_| panic!("Unable to switch to text domain {}", GETTEXT_PACKAGE));
glib::set_application_name(&gettext("Tour"));
glib::set_prgname(Some("Tour"));
......
......@@ -34,6 +34,7 @@ mod imp {
sender: Sender<Action>,
}
#[allow(clippy::derivable_impls)]
impl Default for WelcomePageWidget {
fn default() -> Self {
#[cfg(feature = "video")]
......@@ -191,6 +192,7 @@ glib::wrapper! {
}
impl WelcomePageWidget {
#[allow(clippy::new_without_default)]
pub fn new() -> Self {
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