Skip to content
This repository was archived by the owner on Aug 12, 2025. It is now read-only.

Commit 7e3addb

Browse files
committed
Bump toolchain to 1.78.0, support LXD 6
1 parent 9976abf commit 7e3addb

File tree

12 files changed

+595
-427
lines changed

12 files changed

+595
-427
lines changed

Cargo.lock

Lines changed: 467 additions & 354 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,15 @@ edition = "2021"
99
anyhow = "1.0"
1010
chrono = { version = "0.4", features = ["serde"] }
1111
clap = { version = "4.0", features = ["derive"] }
12-
colored = "2.0"
12+
colored = "2.1"
1313
humantime = "2.1"
14-
indexmap = { version = "1.9", features = ["serde-1"] }
15-
itertools = "0.10"
14+
indexmap = { version = "2.3", features = ["serde"] }
15+
itertools = "0.13"
1616
pathsearch = "0.2"
17-
prettytable-rs = "0.9"
17+
prettytable-rs = "0.10"
1818
serde = { version = "1.0", features = ["derive"] }
1919
serde_json = "1.0"
20-
serde_with = "2.3"
20+
serde_with = "3.9"
2121
serde_yaml = "0.9"
2222
thiserror = "1.0"
2323

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,12 @@ built-in `snapshots.schedule`, but more powerful.
1010

1111
# Requirements
1212

13-
- LXD 4 / 5
13+
- LXD 4 / 5 / 6
1414
- Linux (x86_64)
1515

1616
Plus, if you plan on building lxd-snapper locally:
1717

18-
- Cargo & Rust 1.63.0
18+
- Cargo & Rust 1.78.0
1919
- Nix (for running integration tests)
2020

2121
# Getting started
@@ -40,7 +40,7 @@ $ cd lxd-snapper
4040
$ cargo build --release
4141
$ ./target/release/lxd-snapper
4242

43-
# (or) Using Nix v3
43+
# (or) Using Nix
4444
$ nix build
4545
$ ./result/bin/lxd-snapper
4646
```

flake.lock

Lines changed: 67 additions & 32 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

flake.nix

Lines changed: 29 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,35 @@
1010
url = "github:nixos/nixpkgs/nixos-unstable";
1111
};
1212

13+
# nixpkgs containing LXD 4, used for testing purposes
14+
nixpkgs--lxd-4 = {
15+
url = "github:nixos/nixpkgs/d1c3fea7ecbed758168787fe4e4a3157e52bc808";
16+
};
17+
18+
# nixpkgs containing LXD 5, used for testing purposes
19+
nixpkgs--lxd-5 = {
20+
url = "github:nixos/nixpkgs/ee01de29d2f58d56b1be4ae24c24bd91c5380cea";
21+
};
22+
23+
# nixpkgs containing LXD 6, used for testing purposes
24+
nixpkgs--lxd-6 = {
25+
url = "github:nixos/nixpkgs/4802ed07225c42ec290c86800ccf668807763567";
26+
};
27+
1328
rust-overlay = {
1429
url = "github:oxalica/rust-overlay";
1530
};
1631
};
1732

18-
outputs = { self, naersk, nixpkgs, rust-overlay }:
33+
outputs =
34+
{ self
35+
, naersk
36+
, nixpkgs
37+
, nixpkgs--lxd-4
38+
, nixpkgs--lxd-5
39+
, nixpkgs--lxd-6
40+
, rust-overlay
41+
}:
1942
let
2043
mkPackage = { system, target, RUSTFLAGS }:
2144
let
@@ -58,7 +81,11 @@
5881

5982
mkCheck = { system }:
6083
import ./tests.nix {
61-
inherit nixpkgs;
84+
inherit
85+
nixpkgs
86+
nixpkgs--lxd-4
87+
nixpkgs--lxd-5
88+
nixpkgs--lxd-6;
6289

6390
lxd-snapper = self.packages."${system}".default;
6491
};

rust-toolchain

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.63.0
1+
1.78.0

src/commands/debug_list_instances.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ mod tests {
117117
+=========+===========+=====================+
118118
| default | mysql | running + databases |
119119
+---------+-----------+---------------------+
120-
| default | outlander | <fg=33>NONE</fg> |
120+
| default | outlander | <fg=33>NONE</fg> |
121121
+---------+-----------+---------------------+
122122
| default | redis | databases |
123123
+---------+-----------+---------------------+
@@ -170,7 +170,7 @@ mod tests {
170170
+----------+---------+----------+-------------------+
171171
| server-b | default | php | important-servers |
172172
+----------+---------+----------+-------------------+
173-
| server-c | default | php | <fg=33>NONE</fg> |
173+
| server-c | default | php | <fg=33>NONE</fg> |
174174
+----------+---------+----------+-------------------+
175175
"#,
176176
stdout

src/config.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,8 +115,7 @@ mod tests {
115115
fn examples() {
116116
let examples: Vec<_> = glob::glob("docs/example-configs/*.yaml")
117117
.unwrap()
118-
.into_iter()
119-
.map(|example| example.unwrap())
118+
.map(|path| path.unwrap())
120119
.collect();
121120

122121
if examples.is_empty() {

src/environment.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ impl<'a> Environment<'a> {
1717
use chrono::TimeZone;
1818

1919
Self {
20-
time: || Utc.timestamp(0, 0),
20+
time: || Utc.timestamp_opt(0, 0).unwrap(),
2121
stdout,
2222
config,
2323
lxd,

src/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ mod testing;
1010
mod prelude {
1111
pub(crate) use crate::utils::*;
1212
pub(crate) use crate::{config::*, environment::*, lxd::*};
13-
pub use anyhow::{bail, Context, Error, Result};
13+
pub use anyhow::{bail, Context, Result};
1414
pub use chrono::{DateTime, Utc};
1515
pub use colored::Colorize;
1616
pub use itertools::Itertools;

0 commit comments

Comments
 (0)