Skip to content

Commit

Permalink
Merge pull request #342 from cortex/clippy-and-dependencies
Browse files Browse the repository at this point in the history
fix a number of clippy lints
  • Loading branch information
alexanderkjall committed Mar 10, 2024
2 parents 838c269 + bc0c414 commit a5a6786
Show file tree
Hide file tree
Showing 12 changed files with 689 additions and 681 deletions.
853 changes: 445 additions & 408 deletions Cargo.lock

Large diffs are not rendered by default.

20 changes: 10 additions & 10 deletions Cargo.toml
Expand Up @@ -9,21 +9,21 @@ license = "GPL-3.0-only"
edition = '2021'

[dependencies]
arboard = "3.3.0"
arboard = "3.3.2"
glob = "0.3.1"
gpgme = "0.11.0"
chrono = { version = "0.4", default_features = false, features = ["clock"] }
git2 = "0.18.1"
git2 = "0.18.2"
rand = "0.8.5"
whoami = "1.4.1"
toml = "0.8.8"
reqwest = { version = "0.11.23", features = ["blocking"] }
toml = "0.8.10"
reqwest = { version = "0.11.25", features = ["blocking"] }
hex = "0.4.3"
totp-rs = { version = "5.3.0", features = ["otpauth"] }
sequoia-openpgp = "1.18.0"
anyhow = "1.0.79"
sequoia-ipc = "0.32.0"
base64 = "0.21.7"
totp-rs = { version = "5.5.1", features = ["otpauth"] }
sequoia-openpgp = "1.19.0"
anyhow = "1.0.80"
sequoia-ipc = "0.34.1"
base64 = "0.22.0"
sha2 = "0.10.8"
sha1 = "0.10.6"
hmac = "0.12.1"
Expand All @@ -35,7 +35,7 @@ default-features = false
features = ["toml"]

[dev-dependencies]
tempfile = "3.9.0"
tempfile = "3.10.1"
flate2 = "1.0.28"
tar = "0.4.40"
criterion = "0.5.1"
Expand Down
4 changes: 2 additions & 2 deletions cursive/Cargo.toml
Expand Up @@ -18,7 +18,7 @@ locale_config = "0.3.0"
unic-langid = "0.9.4"
gettext = "0.4.0"
lazy_static = "1.4.0"
toml = "0.8.8"
toml = "0.8.10"
terminal_size = "0.3.0"
hex = "0.4.3"
zeroize = { version = "1.7.0", features = ["zeroize_derive", "alloc"] }
Expand All @@ -29,7 +29,7 @@ default-features = false
features = ["toml"]

[dev-dependencies]
tempfile = "3.8.0"
tempfile = "3.10.1"
chrono = { version = "0.4", default_features = false, features = ["clock"] }

[build-dependencies]
Expand Down
10 changes: 5 additions & 5 deletions gtk/Cargo.toml
Expand Up @@ -7,13 +7,13 @@ edition = "2021"

[dependencies]
ripasso = { path = "../", version = "0.7.0-alpha" }
gtk = { version = "0.6.6", package = "gtk4", features = ["v4_6"] }
adw = { version = "0.4.1", package = "libadwaita" }
glib = "0.17.9"
once_cell = "1.17.1"
gtk = { version = "0.8.1", package = "gtk4", features = ["v4_6"] }
adw = { version = "0.6.0", package = "libadwaita" }
glib = "0.19.2"
once_cell = "1.19.0"
hex = "0.4.3"
config = "0.11.0"
chrono = { version = "0.4", default_features = false, features = ["clock"] }

[build-dependencies]
glib-build-tools = "0.17"
glib-build-tools = "0.19"
2 changes: 1 addition & 1 deletion gtk/src/collection_object/mod.rs
Expand Up @@ -111,7 +111,7 @@ impl CollectionObject {
.map(|p| PasswordObject::from_password_entry(p, store.clone()))
.collect();

let passwords = gio::ListStore::new(PasswordObject::static_type());
let passwords = gio::ListStore::new::<PasswordObject>();
passwords.extend_from_slice(&passwords_to_extend);

Self::new(&title, passwords, store, user_config_dir)
Expand Down
4 changes: 2 additions & 2 deletions gtk/src/window/imp.rs
@@ -1,7 +1,7 @@
use std::{cell::RefCell, path::PathBuf};

use adw::{subclass::prelude::*, Leaflet};
use glib::{signal::Inhibit, subclass::InitializingObject};
use glib::{subclass::InitializingObject, Propagation};
use gtk::{
gio, glib, glib::SignalHandlerId, Button, CompositeTemplate, Entry, FilterListModel, ListBox,
Stack,
Expand Down Expand Up @@ -87,7 +87,7 @@ impl WidgetImpl for Window {}

// Trait shared by all windows
impl WindowImpl for Window {
fn close_request(&self) -> Inhibit {
fn close_request(&self) -> Propagation {
// Pass close request on to the parent
self.parent_close_request()
}
Expand Down
4 changes: 2 additions & 2 deletions gtk/src/window/mod.rs
Expand Up @@ -73,7 +73,7 @@ impl Window {
}

fn setup_collections(&self) {
let collections = gio::ListStore::new(CollectionObject::static_type());
let collections = gio::ListStore::new::<CollectionObject>();
self.imp()
.collections
.set(collections.clone())
Expand Down Expand Up @@ -421,7 +421,7 @@ impl Window {
}

// Create a new list store
let passwords = gio::ListStore::new(PasswordObject::static_type());
let passwords = gio::ListStore::new::<PasswordObject>();

// Create a new collection object from the title the user provided
let title = entry.text().to_string();
Expand Down
4 changes: 2 additions & 2 deletions src/tests/crypto.rs
Expand Up @@ -67,7 +67,7 @@ pub fn new_one_cert() {

cert.serialize(&mut file).unwrap();

let sequoia = Sequoia::new(&dir.path(), f, user_home.path()).unwrap();
let sequoia = Sequoia::new(dir.path(), f, user_home.path()).unwrap();

assert_eq!(1, sequoia.key_ring.len());
assert_eq!(
Expand All @@ -80,7 +80,7 @@ pub fn new_one_cert() {
.next()
.unwrap()
.userid()
.email()
.email2()
.unwrap()
.unwrap()
);
Expand Down
4 changes: 2 additions & 2 deletions src/tests/git.rs
Expand Up @@ -22,7 +22,7 @@ fn test_should_sign_true() -> Result<()> {

let result = should_sign(&repo);

assert_eq!(true, result);
assert!(result);

Ok(())
}
Expand All @@ -35,7 +35,7 @@ fn test_should_sign_false() -> Result<()> {

let result = should_sign(&repo);

assert_eq!(false, result);
assert!(!result);

Ok(())
}

0 comments on commit a5a6786

Please sign in to comment.