Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade dependencies, fix clippy lints #370

Merged
merged 3 commits into from
Dec 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
336 changes: 140 additions & 196 deletions Cargo.lock

Large diffs are not rendered by default.

14 changes: 7 additions & 7 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,21 +22,21 @@ clap = { version = "4.5.8", features = ["derive", "string"] }
clap_complete = "4.5.37"
clap_mangen = "0.2.24"
criterion = { version = "0.5.1", features = ["html_reports"] }
crossterm = "0.27.0"
derive_more = "0.99.18"
crossterm = "0.28.1"
derive_more = { version = "1.0.0", features = ["as_ref", "display", "from", "into"] }
dialoguer = "0.11.0"
diesel = { version = "2.2.1", features = ["sqlite", "returning_clauses_for_sqlite_3_35"] }
diesel_migrations = "2.2.0"
dirs = "5.0.1"
elf = "0.7.4"
indicatif = "0.17.8"
itertools = "0.13.0"
fs-err = { version = "2.11.0", features = ["tokio"] }
futures = "0.3.30"
fs-err = { version = "3.0.0", features = ["tokio"] }
futures-util = "0.3.31"
glob = "0.3.1"
hex = "0.4.3"
indextree = "4.6.1"
libsqlite3-sys = { version = "0.28.0", features = ["bundled"] }
libsqlite3-sys = { version = "0.30.1", features = ["bundled"] }
log = "0.4.22"
nom = "7.1.3"
nix = { version = "0.27.1", features = ["user", "fs", "sched", "process", "mount", "hostname", "signal", "term"] }
Expand All @@ -50,7 +50,7 @@ serde_json = "1.0.120"
serde_yaml = "0.9.34"
sha2 = "0.10.8"
strum = { version = "0.26.3", features = ["derive"] }
thiserror = "1.0.61"
thiserror = "2.0.3"
thread-priority = "1.1.0"
tokio = { version = "1.38.0", features = ["full"] }
tokio-stream = { version = "0.1.15", features = ["time"] }
Expand All @@ -61,7 +61,7 @@ varlink_generator = "10.1.0"
xxhash-rust = { version = "0.8.11", features = ["xxh3"] }
zstd = { version = "0.13.2", features = ["zstdmt"] }
mailparse = "0.15.0"
zbus = "4.4.0"
zbus = "5.1.1"

[profile.release]
lto = "thin"
Expand Down
2 changes: 1 addition & 1 deletion boulder/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ dirs.workspace = true
elf.workspace = true
glob.workspace = true
fs-err.workspace = true
futures.workspace = true
futures-util.workspace = true
hex.workspace = true
itertools.workspace = true
nix.workspace = true
Expand Down
4 changes: 2 additions & 2 deletions boulder/src/architecture.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@ impl Architecture {

#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Display)]
pub enum BuildTarget {
#[display(fmt = "{_0}")]
#[display("{_0}")]
Native(Architecture),
#[display(fmt = "emul32/{_0}")]
#[display("emul32/{_0}")]
Emul32(Architecture),
}

Expand Down
2 changes: 1 addition & 1 deletion boulder/src/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,7 @@ fn breakpoint_line(

let has_key = |line: &str, key: &str| {
line.split_once(':')
.map_or(false, |(leading, _)| leading.trim().ends_with(key))
.is_some_and(|(leading, _)| leading.trim().ends_with(key))
};

let mut lines = recipe
Expand Down
2 changes: 1 addition & 1 deletion boulder/src/build/upstream.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ use std::{
};

use fs_err as fs;
use futures::{stream, StreamExt, TryStreamExt};
use futures_util::{stream, StreamExt, TryStreamExt};
use moss::runtime;
use nix::unistd::{linkat, LinkatFlags};
use sha2::{Digest, Sha256};
Expand Down
2 changes: 1 addition & 1 deletion boulder/src/cli/recipe.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ use boulder::{
};
use clap::Parser;
use fs_err as fs;
use futures::StreamExt;
use futures_util::StreamExt;
use itertools::Itertools;
use moss::{request, runtime};
use sha2::{Digest, Sha256};
Expand Down
2 changes: 1 addition & 1 deletion boulder/src/draft/upstream.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use std::{io, path::Path, process::ExitStatus, time::Duration};

use fs_err::tokio::{self as fs, File};
use futures::{stream, StreamExt, TryStreamExt};
use futures_util::{stream, StreamExt, TryStreamExt};
use moss::{environment, request, runtime};
use sha2::{Digest, Sha256};
use thiserror::Error;
Expand Down
2 changes: 1 addition & 1 deletion moss/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ diesel_migrations.workspace = true
itertools.workspace = true
fnmatch = { path = "../crates/fnmatch" }
fs-err.workspace = true
futures.workspace = true
futures-util.workspace = true
hex.workspace = true
libsqlite3-sys.workspace = true
log.workspace = true
Expand Down
2 changes: 1 addition & 1 deletion moss/src/client/cache.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ use std::{
};

use fs_err::tokio::{self as fs, File};
use futures::StreamExt;
use futures_util::StreamExt;
use thiserror::Error;
use tokio::io::AsyncWriteExt;
use url::Url;
Expand Down
2 changes: 1 addition & 1 deletion moss/src/client/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ use std::{
};

use fs_err::{self as fs, create_dir_all};
use futures::{stream, StreamExt, TryStreamExt};
use futures_util::{stream, StreamExt, TryStreamExt};
use nix::{
errno::Errno,
fcntl::{self, OFlag},
Expand Down
4 changes: 2 additions & 2 deletions moss/src/dependency.rs
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ impl From<Kind> for payload::meta::Dependency {
/// A Dependency in moss is simplistic in that it only contains
/// a target and a Kind, ie. `pkgconfig(zlib)`
#[derive(Debug, Clone, PartialEq, Eq, Hash, Display)]
#[display(fmt = "{kind}({name})")]
#[display("{kind}({name})")]
pub struct Dependency {
/// Specific type of dependency
pub kind: Kind,
Expand Down Expand Up @@ -168,7 +168,7 @@ impl TryFrom<String> for Dependency {

/// A provider is the inverse of a [`Dependency`] - providing the matching requirement
#[derive(Debug, Clone, PartialEq, Eq, Hash, Display)]
#[display(fmt = "{kind}({name})")]
#[display("{kind}({name})")]
pub struct Provider {
/// Specific type of dependency
pub kind: Kind,
Expand Down
2 changes: 1 addition & 1 deletion moss/src/repository/manager.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use std::path::{Path, PathBuf};
use std::time::Duration;

use fs_err::{self as fs, File};
use futures::{stream, StreamExt, TryStreamExt};
use futures_util::{stream, StreamExt, TryStreamExt};
use thiserror::Error;
use xxhash_rust::xxh3::xxh3_64;

Expand Down
2 changes: 1 addition & 1 deletion moss/src/repository/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use std::path::PathBuf;

use derive_more::{Display, From, Into};
use fs_err::tokio::File;
use futures::StreamExt;
use futures_util::StreamExt;
use serde::{Deserialize, Serialize};
use thiserror::Error;
use tokio::io::{self, AsyncWriteExt};
Expand Down
2 changes: 1 addition & 1 deletion moss/src/request.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use std::{io, path::PathBuf, sync::OnceLock};

use bytes::Bytes;
use fs_err::tokio::File;
use futures::{
use futures_util::{
stream::{self, BoxStream},
Stream, StreamExt,
};
Expand Down
2 changes: 1 addition & 1 deletion moss/src/signal.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ pub fn ignore(signals: impl IntoIterator<Item = Signal>) -> Result<Guard, Error>

// https://www.freedesktop.org/wiki/Software/systemd/inhibit/
pub fn inhibit(what: Vec<&str>, who: String, why: String, mode: String) -> Result<message::Body, Error> {
let conn = zbus::blocking::ConnectionBuilder::system()?.build()?;
let conn = zbus::blocking::Connection::system()?;
let msg = conn.call_method(
Some("org.freedesktop.login1"),
"/org/freedesktop/login1",
Expand Down
4 changes: 2 additions & 2 deletions moss/src/varlink/com_serpentos_moss.rs
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@
}
}
pub trait VarlinkCallError: varlink::CallTrait {}
impl<'a> VarlinkCallError for varlink::Call<'a> {}
impl VarlinkCallError for varlink::Call<'_> {}

Check warning on line 110 in moss/src/varlink/com_serpentos_moss.rs

View workflow job for this annotation

GitHub Actions / Build & Test Project

[clippy] reported by reviewdog 🐶 warning: the following explicit lifetimes could be elided: 'a --> moss/src/varlink/com_serpentos_moss.rs:110:6 | 110 | impl<'a> VarlinkCallError for varlink::Call<'a> {} | ^^ ^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes = note: `#[warn(clippy::needless_lifetimes)]` on by default help: elide the lifetimes | 110 - impl<'a> VarlinkCallError for varlink::Call<'a> {} 110 + impl VarlinkCallError for varlink::Call<'_> {} | Raw Output: moss/src/varlink/com_serpentos_moss.rs:110:6:w:warning: the following explicit lifetimes could be elided: 'a --> moss/src/varlink/com_serpentos_moss.rs:110:6 | 110 | impl<'a> VarlinkCallError for varlink::Call<'a> {} | ^^ ^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes = note: `#[warn(clippy::needless_lifetimes)]` on by default help: elide the lifetimes | 110 - impl<'a> VarlinkCallError for varlink::Call<'a> {} 110 + impl VarlinkCallError for varlink::Call<'_> {} | __END__
#[derive(Serialize, Deserialize, Debug, PartialEq, Clone)]
pub struct Version_Reply {
pub r#version: String,
Expand All @@ -120,7 +120,7 @@
self.reply_struct(Version_Reply { r#version }.into())
}
}
impl<'a> Call_Version for varlink::Call<'a> {}
impl Call_Version for varlink::Call<'_> {}

Check warning on line 123 in moss/src/varlink/com_serpentos_moss.rs

View workflow job for this annotation

GitHub Actions / Build & Test Project

[clippy] reported by reviewdog 🐶 warning: the following explicit lifetimes could be elided: 'a --> moss/src/varlink/com_serpentos_moss.rs:123:6 | 123 | impl<'a> Call_Version for varlink::Call<'a> {} | ^^ ^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes help: elide the lifetimes | 123 - impl<'a> Call_Version for varlink::Call<'a> {} 123 + impl Call_Version for varlink::Call<'_> {} | Raw Output: moss/src/varlink/com_serpentos_moss.rs:123:6:w:warning: the following explicit lifetimes could be elided: 'a --> moss/src/varlink/com_serpentos_moss.rs:123:6 | 123 | impl<'a> Call_Version for varlink::Call<'a> {} | ^^ ^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes help: elide the lifetimes | 123 - impl<'a> Call_Version for varlink::Call<'a> {} 123 + impl Call_Version for varlink::Call<'_> {} | __END__
pub trait VarlinkInterface {
fn version(&self, call: &mut dyn Call_Version) -> varlink::Result<()>;
fn call_upgraded(&self, _call: &mut varlink::Call, _bufreader: &mut dyn BufRead) -> varlink::Result<Vec<u8>> {
Expand Down