Skip to content

Commit

Permalink
Merge pull request #786 from marhkb/build/cargo/update-deps
Browse files Browse the repository at this point in the history
build(cargo): Update dependencies
  • Loading branch information
marhkb committed Feb 5, 2024
2 parents 17cf229 + 682e3ba commit 617de8a
Show file tree
Hide file tree
Showing 58 changed files with 468 additions and 548 deletions.
522 changes: 279 additions & 243 deletions Cargo.lock

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ authors = ["Marcus Behrendt <[email protected]>"]
edition = "2021"

[dependencies]
adw = { git = "https://gitlab.gnome.org/World/Rust/libadwaita-rs", version = "0.6", package = "libadwaita", features = ["v1_4"] }
adw = { version = "0.6", package = "libadwaita", features = ["v1_4"] }
anyhow = "1"
ashpd = { git = "https://github.com/bilelmoussaoui/ashpd.git", version = "0.6", rev = "30216eccd3f4ecb50c4d34a493a33e6eef4e375c", default-features = false, features = ["gtk4", "tokio"] }
ashpd = { version = "0.7", default-features = false, features = ["gtk4", "tokio"] }
futures = { version = "0.3", default-features = false }
gettext-rs = { version = "0.7", features = ["gettext-system"] }
gtk = { git = "https://github.com/gtk-rs/gtk4-rs.git", version = "0.8", package = "gtk4", features = ["gnome_45"] }
gtk = { version = "0.8", package = "gtk4", features = ["gnome_45"] }
indexmap = { version = "2", features = ["serde"] }
log = "0.4"
multi_log = "0.1"
Expand All @@ -21,12 +21,12 @@ podman-api = { git = "https://github.com/vv9k/podman-api-rs.git", commit = "363d
serde = "1"
serde_json = "1"
simplelog = { version = "0.12", features = ["paris"] }
sourceview5 = { git = "https://gitlab.gnome.org/World/Rust/sourceview5-rs.git", version = "0.8", features = ["gtk_v4_12"] }
sourceview5 = { version = "0.8", features = ["gtk_v4_12"] }
syslog = "6"
tokio = "1"
tokio-tar = { version = "0.3", default-features = false }
vte = { version = "0.13", default-features = false }
vte4 = { git = "https://gitlab.gnome.org/World/Rust/vte4-rs.git", version = "0.8" }
vte4 = "0.7"

[profile.release]
lto = true
Expand Down
9 changes: 4 additions & 5 deletions src/application.rs
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
use std::cell::Cell;
use std::cell::OnceCell;
use std::sync::OnceLock;

use adw::prelude::*;
use adw::subclass::prelude::*;
use gettextrs::gettext;
use glib::clone;
use glib::once_cell::sync::Lazy;
use gtk::gdk;
use gtk::gio;
use gtk::glib;
Expand Down Expand Up @@ -33,10 +33,9 @@ mod imp {

impl ObjectImpl for Application {
fn properties() -> &'static [glib::ParamSpec] {
static PROPERTIES: Lazy<Vec<glib::ParamSpec>> =
Lazy::new(|| vec![glib::ParamSpecUInt64::builder("ticks").read_only().build()]);

PROPERTIES.as_ref()
static PROPERTIES: OnceLock<Vec<glib::ParamSpec>> = OnceLock::new();
PROPERTIES
.get_or_init(|| vec![glib::ParamSpecUInt64::builder("ticks").read_only().build()])
}

fn property(&self, _id: usize, pspec: &glib::ParamSpec) -> glib::Value {
Expand Down
10 changes: 6 additions & 4 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,19 @@ use adw::prelude::*;
use gettextrs::gettext;
use gettextrs::LocaleCategory;
use glib::clone;
use glib::once_cell::sync::Lazy;
use gtk::gio;
use gtk::glib;

use self::application::Application;

pub(crate) static APPLICATION_OPTS: OnceLock<ApplicationOptions> = OnceLock::new();
pub(crate) static RUNTIME: Lazy<tokio::runtime::Runtime> =
Lazy::new(|| tokio::runtime::Runtime::new().unwrap());
pub(crate) static KEYRING: OnceLock<oo7::Keyring> = OnceLock::new();

fn runtime() -> &'static tokio::runtime::Runtime {
static RUNTIME: OnceLock<tokio::runtime::Runtime> = OnceLock::new();
RUNTIME.get_or_init(|| tokio::runtime::Runtime::new().unwrap())
}

fn main() {
let app = setup_cli(Application::default());

Expand Down Expand Up @@ -128,7 +130,7 @@ fn main() {
}
});

RUNTIME.block_on(async {
crate::runtime().block_on(async {
match oo7::Keyring::new().await {
Ok(keyring) => KEYRING.set(keyring).unwrap(),
Err(e) => log::error!("Failed to start Secret Service: {e}"),
Expand Down
15 changes: 8 additions & 7 deletions src/model/abstract_container_list.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
use std::sync::OnceLock;

use gio::prelude::*;
use glib::clone;
use glib::once_cell::sync::Lazy as SyncLazy;
use glib::subclass::prelude::*;
use glib::subclass::Signal;
use gtk::gio;
Expand All @@ -20,7 +21,8 @@ mod imp {
type Prerequisites = (gio::ListModel,);

fn signals() -> &'static [Signal] {
static SIGNALS: SyncLazy<Vec<Signal>> = SyncLazy::new(|| {
static SIGNALS: OnceLock<Vec<Signal>> = OnceLock::new();
SIGNALS.get_or_init(|| {
vec![
Signal::builder("container-added")
.param_types([model::Container::static_type()])
Expand All @@ -32,12 +34,12 @@ mod imp {
.param_types([model::Container::static_type()])
.build(),
]
});
SIGNALS.as_ref()
})
}

fn properties() -> &'static [glib::ParamSpec] {
static PROPERTIES: SyncLazy<Vec<glib::ParamSpec>> = SyncLazy::new(|| {
static PROPERTIES: OnceLock<Vec<glib::ParamSpec>> = OnceLock::new();
PROPERTIES.get_or_init(|| {
vec![
glib::ParamSpecUInt::builder("len").read_only().build(),
glib::ParamSpecUInt::builder("created").read_only().build(),
Expand All @@ -52,8 +54,7 @@ mod imp {
glib::ParamSpecUInt::builder("stopped").read_only().build(),
glib::ParamSpecUInt::builder("stopping").read_only().build(),
]
});
PROPERTIES.as_ref()
})
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/model/action.rs
Original file line number Diff line number Diff line change
Expand Up @@ -765,7 +765,7 @@ impl Action {
}

if run {
crate::RUNTIME.spawn({
crate::runtime().spawn({
let podman = client.podman();
async move {
podman
Expand Down
7 changes: 3 additions & 4 deletions src/model/container.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ use std::collections::HashSet;
use std::fmt;
use std::ops::Deref;
use std::str::FromStr;
use std::sync::OnceLock;

use futures::Future;
use gettextrs::gettext;
use glib::clone;
use glib::once_cell::sync::Lazy as SyncLazy;
use glib::prelude::*;
use glib::subclass::prelude::*;
use glib::subclass::Signal;
Expand Down Expand Up @@ -191,9 +191,8 @@ mod imp {

impl ObjectImpl for Container {
fn signals() -> &'static [Signal] {
static SIGNALS: SyncLazy<Vec<Signal>> =
SyncLazy::new(|| vec![Signal::builder("deleted").build()]);
SIGNALS.as_ref()
static SIGNALS: OnceLock<Vec<Signal>> = OnceLock::new();
SIGNALS.get_or_init(|| vec![Signal::builder("deleted").build()])
}

fn properties() -> &'static [glib::ParamSpec] {
Expand Down
7 changes: 3 additions & 4 deletions src/model/device.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use std::cell::Cell;
use std::cell::RefCell;
use std::sync::OnceLock;

use glib::once_cell::sync::Lazy as SyncLazy;
use glib::prelude::*;
use glib::subclass::prelude::*;
use glib::subclass::Signal;
Expand Down Expand Up @@ -34,9 +34,8 @@ mod imp {

impl ObjectImpl for Device {
fn signals() -> &'static [Signal] {
static SIGNALS: SyncLazy<Vec<Signal>> =
SyncLazy::new(|| vec![Signal::builder("remove-request").build()]);
SIGNALS.as_ref()
static SIGNALS: OnceLock<Vec<Signal>> = OnceLock::new();
SIGNALS.get_or_init(|| vec![Signal::builder("remove-request").build()])
}

fn properties() -> &'static [glib::ParamSpec] {
Expand Down
7 changes: 3 additions & 4 deletions src/model/image.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ use std::cell::OnceCell;
use std::cell::RefCell;
use std::collections::HashSet;
use std::ops::Deref;
use std::sync::OnceLock;

use glib::clone;
use glib::once_cell::sync::Lazy as SyncLazy;
use glib::prelude::*;
use glib::subclass::prelude::*;
use glib::subclass::Signal;
Expand Down Expand Up @@ -64,9 +64,8 @@ mod imp {

impl ObjectImpl for Image {
fn signals() -> &'static [Signal] {
static SIGNALS: SyncLazy<Vec<Signal>> =
SyncLazy::new(|| vec![Signal::builder("deleted").build()]);
SIGNALS.as_ref()
static SIGNALS: OnceLock<Vec<Signal>> = OnceLock::new();
SIGNALS.get_or_init(|| vec![Signal::builder("deleted").build()])
}

fn properties() -> &'static [glib::ParamSpec] {
Expand Down
7 changes: 3 additions & 4 deletions src/model/image_list.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ use std::sync::OnceLock;
use gio::prelude::*;
use gio::subclass::prelude::*;
use glib::clone;
use glib::once_cell::sync::Lazy;
use glib::subclass::Signal;
use glib::Properties;
use gtk::gio;
Expand Down Expand Up @@ -46,7 +45,8 @@ mod imp {

impl ObjectImpl for ImageList {
fn signals() -> &'static [Signal] {
static SIGNALS: Lazy<Vec<Signal>> = Lazy::new(|| {
static SIGNALS: OnceLock<Vec<Signal>> = OnceLock::new();
SIGNALS.get_or_init(|| {
vec![
Signal::builder("image-added")
.param_types([model::Image::static_type()])
Expand All @@ -55,8 +55,7 @@ mod imp {
.param_types([model::Image::static_type()])
.build(),
]
});
SIGNALS.as_ref()
})
}

fn properties() -> &'static [glib::ParamSpec] {
Expand Down
7 changes: 3 additions & 4 deletions src/model/key_val.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use std::cell::RefCell;
use std::sync::OnceLock;

use glib::once_cell::sync::Lazy as SyncLazy;
use glib::prelude::*;
use glib::subclass::prelude::*;
use glib::subclass::Signal;
Expand Down Expand Up @@ -28,9 +28,8 @@ mod imp {

impl ObjectImpl for KeyVal {
fn signals() -> &'static [Signal] {
static SIGNALS: SyncLazy<Vec<Signal>> =
SyncLazy::new(|| vec![Signal::builder("remove-request").build()]);
SIGNALS.as_ref()
static SIGNALS: OnceLock<Vec<Signal>> = OnceLock::new();
SIGNALS.get_or_init(|| vec![Signal::builder("remove-request").build()])
}

fn properties() -> &'static [glib::ParamSpec] {
Expand Down
7 changes: 3 additions & 4 deletions src/model/mount.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
use std::cell::Cell;
use std::cell::RefCell;
use std::fmt;
use std::sync::OnceLock;

use glib::once_cell::sync::Lazy as SyncLazy;
use glib::prelude::*;
use glib::subclass::prelude::*;
use glib::subclass::Signal;
Expand Down Expand Up @@ -76,9 +76,8 @@ mod imp {

impl ObjectImpl for Mount {
fn signals() -> &'static [Signal] {
static SIGNALS: SyncLazy<Vec<Signal>> =
SyncLazy::new(|| vec![Signal::builder("remove-request").build()]);
SIGNALS.as_ref()
static SIGNALS: OnceLock<Vec<Signal>> = OnceLock::new();
SIGNALS.get_or_init(|| vec![Signal::builder("remove-request").build()])
}

fn properties() -> &'static [glib::ParamSpec] {
Expand Down
7 changes: 3 additions & 4 deletions src/model/pod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ use std::fmt;
use std::ops::Deref;
use std::rc::Rc;
use std::str::FromStr;
use std::sync::OnceLock;

use futures::prelude::*;
use futures::Future;
use gettextrs::gettext;
use glib::clone;
use glib::once_cell::sync::Lazy;
use glib::prelude::*;
use glib::subclass::prelude::*;
use glib::subclass::Signal;
Expand Down Expand Up @@ -121,9 +121,8 @@ mod imp {

impl ObjectImpl for Pod {
fn signals() -> &'static [Signal] {
static SIGNALS: Lazy<Vec<Signal>> =
Lazy::new(|| vec![Signal::builder("deleted").build()]);
SIGNALS.as_ref()
static SIGNALS: OnceLock<Vec<Signal>> = OnceLock::new();
SIGNALS.get_or_init(|| vec![Signal::builder("deleted").build()])
}

fn properties() -> &'static [glib::ParamSpec] {
Expand Down
7 changes: 3 additions & 4 deletions src/model/pod_list.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ use std::sync::OnceLock;
use gio::prelude::*;
use gio::subclass::prelude::*;
use glib::clone;
use glib::once_cell::sync::Lazy as SyncLazy;
use glib::subclass::Signal;
use glib::Properties;
use gtk::gio;
Expand Down Expand Up @@ -45,12 +44,12 @@ mod imp {

impl ObjectImpl for PodList {
fn signals() -> &'static [Signal] {
static SIGNALS: SyncLazy<Vec<Signal>> = SyncLazy::new(|| {
static SIGNALS: OnceLock<Vec<Signal>> = OnceLock::new();
SIGNALS.get_or_init(|| {
vec![Signal::builder("pod-added")
.param_types([model::Pod::static_type()])
.build()]
});
SIGNALS.as_ref()
})
}

fn properties() -> &'static [glib::ParamSpec] {
Expand Down
7 changes: 3 additions & 4 deletions src/model/port_mapping.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ use std::cell::Cell;
use std::cell::RefCell;
use std::fmt;
use std::str::FromStr;
use std::sync::OnceLock;

use glib::once_cell::sync::Lazy as SyncLazy;
use glib::prelude::*;
use glib::subclass::prelude::*;
use glib::subclass::Signal;
Expand Down Expand Up @@ -72,9 +72,8 @@ mod imp {

impl ObjectImpl for PortMapping {
fn signals() -> &'static [Signal] {
static SIGNALS: SyncLazy<Vec<Signal>> =
SyncLazy::new(|| vec![Signal::builder("remove-request").build()]);
SIGNALS.as_ref()
static SIGNALS: OnceLock<Vec<Signal>> = OnceLock::new();
SIGNALS.get_or_init(|| vec![Signal::builder("remove-request").build()])
}

fn properties() -> &'static [glib::ParamSpec] {
Expand Down
8 changes: 4 additions & 4 deletions src/model/port_mapping_list.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
use std::cell::OnceCell;
use std::sync::OnceLock;

use gio::prelude::*;
use gio::subclass::prelude::*;
use glib::once_cell::sync::Lazy as SyncLazy;
use gtk::gio;
use gtk::glib;

Expand All @@ -26,12 +26,12 @@ mod imp {

impl ObjectImpl for PortMappingList {
fn properties() -> &'static [glib::ParamSpec] {
static PROPERTIES: SyncLazy<Vec<glib::ParamSpec>> = SyncLazy::new(|| {
static PROPERTIES: OnceLock<Vec<glib::ParamSpec>> = OnceLock::new();
PROPERTIES.get_or_init(|| {
vec![glib::ParamSpecUInt::builder("len")
.explicit_notify()
.build()]
});
PROPERTIES.as_ref()
})
}

fn property(&self, _id: usize, pspec: &glib::ParamSpec) -> glib::Value {
Expand Down
Loading

0 comments on commit 617de8a

Please sign in to comment.