Skip to content
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
2 changes: 1 addition & 1 deletion .github/workflows/audit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ jobs:
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4

- uses: EmbarkStudios/cargo-deny-action@e2f4ede4a4e60ea15ff31bc0647485d80c66cfba # v2
- uses: EmbarkStudios/cargo-deny-action@34899fc7ba81ca6268d5947a7a16b4649013fea1 # v2
with:
command: check bans licenses sources

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/careful.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
with:
toolchain: ${{ matrix.rust }}
- name: install cargo-careful
uses: taiki-e/install-action@8484225d9734e230a8bf38421a4ffec1cc249372 # v2
uses: taiki-e/install-action@2dbeb927f58939d3aa13bf06ba0c0a34b76b9bfb # v2
with:
tool: cargo-careful
- uses: Swatinem/rust-cache@82a92a6e8fbeee089604da2575dc567ae9ddeaab # v2
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/ci-heavy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ jobs:
with:
toolchain: ${{ matrix.rust }}
- name: install cargo-hack
uses: taiki-e/install-action@8484225d9734e230a8bf38421a4ffec1cc249372 # v2
uses: taiki-e/install-action@2dbeb927f58939d3aa13bf06ba0c0a34b76b9bfb # v2
with:
tool: cargo-hack
- uses: Swatinem/rust-cache@82a92a6e8fbeee089604da2575dc567ae9ddeaab # v2
Expand Down Expand Up @@ -253,7 +253,7 @@ jobs:
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- name: Install cargo-hack
uses: taiki-e/install-action@8484225d9734e230a8bf38421a4ffec1cc249372 # v2
uses: taiki-e/install-action@2dbeb927f58939d3aa13bf06ba0c0a34b76b9bfb # v2
with:
tool: cargo-hack

Expand Down
16 changes: 8 additions & 8 deletions .github/workflows/coverage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ concurrency:
on:
push:
paths:
- '**.rs'
- '**.snap'
- '**.yml'
- "**.rs"
- "**.snap"
- "**.yml"
jobs:
test:
name: Generate Coverage Report
Expand All @@ -20,22 +20,22 @@ jobs:
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4

- name: Install cargo-tarpaulin
uses: taiki-e/install-action@8484225d9734e230a8bf38421a4ffec1cc249372 # v2
uses: taiki-e/install-action@2dbeb927f58939d3aa13bf06ba0c0a34b76b9bfb # v2
with:
tool: cargo-tarpaulin

# We run the coverage report on the workspace, but we configured in codecov to only look at parts of the workspace essentially
#
#
# This is because we have a workspace with multiple crates, and we want to generate coverage for all of them, but we only want to
# report the coverage of rustic_backend and rustic_core crates (currently) as this is where the main logic is
- name: Generate code coverage
env:
env:
RUST_BACKTRACE: "0"
run: |
cargo tarpaulin --verbose --all-features --workspace --timeout 120 --out xml

- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@1e68e06f1dbfde0e4cefc87efeba9e4643565303 # v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
slug: rustic-rs/rustic_core
slug: rustic-rs/rustic_core
5 changes: 3 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ members = [
"crates/testing",
"examples/*",
]
resolver = "2"
resolver = "3"

[workspace.package]
rust-version = "1.76.0"
rust-version = "1.85.0"

[workspace.dependencies]
# Internal Dependencies
Expand Down Expand Up @@ -106,6 +106,7 @@ pedantic = { level = "warn", priority = -1 }
nursery = { level = "warn", priority = -1 }
# expect_used = "warn" # TODO!
# unwrap_used = "warn" # TODO!
literal_string_with_formatting_args = "allow"
enum_glob_use = "warn"
correctness = { level = "warn", priority = -1 }
suspicious = { level = "warn", priority = -1 }
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ Please make sure, that you read the

## Minimum Rust version policy

This crate's minimum supported `rustc` version is `1.76.0`.
This crate's minimum supported `rustc` version is `1.85.0`.

The current policy is that the minimum Rust version required to use this crate
can be increased in minor version updates. For example, if `crate 1.0` requires
Expand Down
2 changes: 1 addition & 1 deletion crates/backend/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ license = "Apache-2.0 OR MIT"
publish = true
readme = "README.md"
repository = "https://github.com/rustic-rs/rustic_core/tree/main/crates/backend"
resolver = "2"
resolver = "3"
rust-version = { workspace = true }
description = """
rustic_backend - library for supporting various backends in rustic-rs
Expand Down
2 changes: 1 addition & 1 deletion crates/backend/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ Please make sure, that you read the

## Minimum Rust version policy

This crate's minimum supported `rustc` version is `1.76.0`.
This crate's minimum supported `rustc` version is `1.85.0`.

The current policy is that the minimum Rust version required to use this crate
can be increased in minor version updates. For example, if `crate 1.0` requires
Expand Down
4 changes: 2 additions & 2 deletions crates/config/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@ version = "0.2.2"
authors = ["the rustic-rs team"]
categories = ["config"]
documentation = "https://docs.rs/rustic_config"
edition = "2021"
edition = "2024"
homepage = "https://rustic.cli.rs/"
include = ["src/**/*", "LICENSE-*", "README.md"]
keywords = ["backup", "restic", "deduplication", "encryption", "library"]
license = "Apache-2.0 OR MIT"
publish = true
readme = "README.md"
repository = "https://github.com/rustic-rs/rustic_core"
resolver = "2"
resolver = "3"
rust-version = { workspace = true }
description = """
rustic_config - library for configuration support in rustic-rs
Expand Down
2 changes: 1 addition & 1 deletion crates/config/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ Please make sure, that you read the

## Minimum Rust version policy

This crate's minimum supported `rustc` version is `1.76.0`.
This crate's minimum supported `rustc` version is `1.85.0`.

The current policy is that the minimum Rust version required to use this crate
can be increased in minor version updates. For example, if `crate 1.0` requires
Expand Down
4 changes: 2 additions & 2 deletions crates/core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@ version = "0.7.3"
authors = ["the rustic-rs team"]
categories = ["data-structures", "encoding", "filesystem"]
documentation = "https://docs.rs/rustic_core"
edition = "2021"
edition = "2024"
homepage = "https://rustic.cli.rs/"
include = ["src/**/*", "LICENSE-*", "README.md"]
keywords = ["backup", "restic", "deduplication", "encryption", "library"]
license = "Apache-2.0 OR MIT"
publish = true
readme = "README.md"
repository = "https://github.com/rustic-rs/rustic_core"
resolver = "2"
resolver = "3"
rust-version = { workspace = true }
description = """
rustic_core - library for fast, encrypted, deduplicated backups that powers rustic-rs
Expand Down
2 changes: 1 addition & 1 deletion crates/core/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ Please make sure, that you read the

## Minimum Rust version policy

This crate's minimum supported `rustc` version is `1.76.0`.
This crate's minimum supported `rustc` version is `1.85.0`.

The current policy is that the minimum Rust version required to use this crate
can be increased in minor version updates. For example, if `crate 1.0` requires
Expand Down
8 changes: 4 additions & 4 deletions crates/core/src/repofile/snapshotfile.rs
Original file line number Diff line number Diff line change
Expand Up @@ -738,10 +738,10 @@ impl SnapshotFile {
group
.hostname
.as_ref()
.map_or(true, |val| val == &self.hostname)
&& group.label.as_ref().map_or(true, |val| val == &self.label)
&& group.paths.as_ref().map_or(true, |val| val == &self.paths)
&& group.tags.as_ref().map_or(true, |val| val == &self.tags)
.is_none_or(|val| val == &self.hostname)
&& group.label.as_ref().is_none_or(|val| val == &self.label)
&& group.paths.as_ref().is_none_or(|val| val == &self.paths)
&& group.tags.as_ref().is_none_or(|val| val == &self.tags)
}

/// Get [`SnapshotFile`]s which match the filter grouped by the group criterion
Expand Down
5 changes: 2 additions & 3 deletions crates/core/tests/integration.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,13 @@ use std::{env, fs::File, path::Path, sync::Arc};
use anyhow::Result;
use flate2::read::GzDecoder;
use insta::{
assert_ron_snapshot,
Settings, assert_ron_snapshot,
internals::{Content, ContentPath},
Settings,
};
use rstest::fixture;
use serde::Serialize;
use tar::Archive;
use tempfile::{tempdir, TempDir};
use tempfile::{TempDir, tempdir};
// uncomment for logging output
// use simplelog::{Config, SimpleLogger};

Expand Down
6 changes: 3 additions & 3 deletions crates/core/tests/integration/backup.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@ use pretty_assertions::assert_eq;
use rstest::rstest;

use rustic_core::{
repofile::{PackId, SnapshotFile},
BackupOptions, CommandInput, ParentOptions, PathList, SnapshotGroupCriterion, SnapshotOptions,
StringList,
repofile::{PackId, SnapshotFile},
};

use super::{
assert_with_win, insta_node_redaction, insta_snapshotfile_redaction, set_up_repo,
tar_gz_testdata, RepoOpen, TestSource,
RepoOpen, TestSource, assert_with_win, insta_node_redaction, insta_snapshotfile_redaction,
set_up_repo, tar_gz_testdata,
};

#[rstest]
Expand Down
4 changes: 2 additions & 2 deletions crates/core/tests/integration/find.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ use globset::Glob;
use rstest::rstest;

use rustic_core::{
repofile::{Node, SnapshotFile},
BackupOptions, FindMatches, FindNode,
repofile::{Node, SnapshotFile},
};

use super::{assert_with_win, set_up_repo, tar_gz_testdata, RepoOpen, TestSource};
use super::{RepoOpen, TestSource, assert_with_win, set_up_repo, tar_gz_testdata};

#[rstest]
fn test_find(tar_gz_testdata: Result<TestSource>, set_up_repo: Result<RepoOpen>) -> Result<()> {
Expand Down
4 changes: 2 additions & 2 deletions crates/core/tests/integration/ls.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ use insta::Settings;
use rstest::rstest;

use rustic_core::{
repofile::{Metadata, Node, SnapshotFile},
BackupOptions, LsOptions, RusticResult,
repofile::{Metadata, Node, SnapshotFile},
};

use super::{
assert_with_win, insta_node_redaction, set_up_repo, tar_gz_testdata, RepoOpen, TestSource,
RepoOpen, TestSource, assert_with_win, insta_node_redaction, set_up_repo, tar_gz_testdata,
};

#[rstest]
Expand Down
4 changes: 2 additions & 2 deletions crates/core/tests/integration/prune.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ use anyhow::Result;
use rstest::rstest;

use rustic_core::{
repofile::SnapshotFile, BackupOptions, CheckOptions, LimitOption, PathList, PruneOptions,
BackupOptions, CheckOptions, LimitOption, PathList, PruneOptions, repofile::SnapshotFile,
};

use super::{set_up_repo, tar_gz_testdata, RepoOpen, TestSource};
use super::{RepoOpen, TestSource, set_up_repo, tar_gz_testdata};

#[rstest]
fn test_prune(
Expand Down
4 changes: 2 additions & 2 deletions crates/core/tests/integration/vfs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ use insta::Settings;
use pretty_assertions::assert_eq;
use rstest::rstest;

use rustic_core::{repofile::SnapshotFile, vfs::Vfs, BackupOptions};
use rustic_core::{BackupOptions, repofile::SnapshotFile, vfs::Vfs};

use super::{
assert_with_win, insta_node_redaction, set_up_repo, tar_gz_testdata, RepoOpen, TestSource,
RepoOpen, TestSource, assert_with_win, insta_node_redaction, set_up_repo, tar_gz_testdata,
};

#[rstest]
Expand Down
3 changes: 2 additions & 1 deletion crates/testing/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
[package]
name = "rustic_testing"
version = "0.3.2"
edition = "2021"
edition = "2024"
license = "Apache-2.0 OR MIT"
publish = true
resolver = "3"
rust-version = { workspace = true }
description = """
rustic_testuing - library for test support in rustic-rs
Expand Down