summary refs log tree commit diff
diff options
context:
space:
mode:
authorVika <vika@fireburn.ru>2024-09-04 15:07:57 +0300
committerVika <vika@fireburn.ru>2024-09-04 19:51:50 +0300
commitbda6ce2816d1f30468d50cbfeaca9614ad4e0c87 (patch)
treeaa89de004098e554ef9af98e7d87a5d911a3c727
parentf8cc6234da837996f0b18b9a1038491f479a1764 (diff)
Deal with Clippy warnings
1. narrow_layout is indeed unused, `AdwBreakpoint` remembers initial
values and restores them on load
2. `TagPillWidgets` is not exactly dead code, I'm adding all the
widgets to it to emulate how Relm4 macros do it. Perhaps it'll be used
in the future.
3. We currently ignore the libsecret result on clearing the tokens
because dealing with libsecret errors is annoying and requires unsafe
code due to outdated dependencies.
-rw-r--r--src/components/post_editor.rs2
-rw-r--r--src/components/tag_pill.rs1
-rw-r--r--src/lib.rs2
3 files changed, 2 insertions, 3 deletions
diff --git a/src/components/post_editor.rs b/src/components/post_editor.rs
index d1a6cf0..8c81b6b 100644
--- a/src/components/post_editor.rs
+++ b/src/components/post_editor.rs
@@ -86,7 +86,6 @@ pub(crate) struct PostEditor<E> {
     visibility: Visibility,
 
     #[do_not_track] wide_layout: gtk::GridLayout,
-    #[do_not_track] narrow_layout: gtk::BoxLayout,
 
     #[do_not_track] smart_summary: Controller<components::SmartSummaryButton>,
     _err: std::marker::PhantomData<E>
@@ -355,7 +354,6 @@ impl<E: std::error::Error + std::fmt::Debug + Send + 'static> Component for Post
             visibility: Visibility::Public,
 
             wide_layout: gtk::GridLayout::new(),
-            narrow_layout: gtk::BoxLayout::new(gtk::Orientation::Vertical),
 
             smart_summary: components::SmartSummaryButton::builder()
                 .launch(())
diff --git a/src/components/tag_pill.rs b/src/components/tag_pill.rs
index 487add7..0dc9117 100644
--- a/src/components/tag_pill.rs
+++ b/src/components/tag_pill.rs
@@ -7,6 +7,7 @@ pub(crate) struct TagPill(pub(crate) Box<str>);
 #[derive(Debug)]
 pub(crate) struct TagPillDelete(pub(crate) DynamicIndex);
 
+#[allow(dead_code)]
 pub(crate) struct TagPillWidgets {
     label: gtk::Label,
     button: gtk::Button,
diff --git a/src/lib.rs b/src/lib.rs
index ee92350..7f2a78d 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -299,7 +299,7 @@ impl AsyncComponent for App {
         match message {
             Input::SignOut => {
                 if self.micropub.take().is_some() {
-                    libsecret::password_clear_future(
+                    let _ = libsecret::password_clear_future(
                         Some(&self.secret_schema),
                         Default::default(),
                     ).await;