Skip to content

Commit

Permalink
document Repository
Browse files Browse the repository at this point in the history
  • Loading branch information
aawsome committed Jul 30, 2023
1 parent 8337a1b commit 91b8c8d
Show file tree
Hide file tree
Showing 12 changed files with 148 additions and 19 deletions.
4 changes: 2 additions & 2 deletions crates/rustic_core/src/commands/backup.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ use crate::{
backend::{dry_run::DryRunBackend, stdin::StdinSource},
repofile::SnapshotFile,
repository::{IndexedIds, IndexedTree},
Id, LocalSource, LocalSourceFilterOptions, LocalSourceSaveOptions, Open, PathList,
ProgressBars, Repository, RusticResult, SnapshotGroup, SnapshotGroupCriterion,
Id, LocalSource, LocalSourceFilterOptions, LocalSourceSaveOptions, PathList, ProgressBars,
Repository, RusticResult, SnapshotGroup, SnapshotGroupCriterion,
};

#[cfg_attr(feature = "clap", derive(clap::Parser))]
Expand Down
3 changes: 2 additions & 1 deletion crates/rustic_core/src/commands/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ use crate::{
backend::decrypt::{DecryptBackend, DecryptWriteBackend},
error::CommandErrorKind,
repofile::ConfigFile,
Key, Open, Repository, RusticResult,
repository::Open,
Key, Repository, RusticResult,
};

pub(crate) fn apply_config<P, S: Open>(
Expand Down
4 changes: 2 additions & 2 deletions crates/rustic_core/src/commands/copy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ use crate::{
blob::{packer::Packer, tree::TreeStreamerOnce, BlobType},
index::{indexer::Indexer, IndexedBackend, ReadIndex},
repofile::SnapshotFile,
repository::{IndexedFull, IndexedIds, IndexedTree},
Open, ProgressBars, Repository, RusticResult,
repository::{IndexedFull, IndexedIds, IndexedTree, Open},
ProgressBars, Repository, RusticResult,
};

#[derive(Debug)]
Expand Down
3 changes: 2 additions & 1 deletion crates/rustic_core/src/commands/key.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ use crate::{
crypto::hasher::hash,
error::CommandErrorKind,
repofile::KeyFile,
Id, Key, Open, Repository, RusticResult,
repository::Open,
Id, Key, Repository, RusticResult,
};

#[cfg_attr(feature = "clap", derive(clap::Parser))]
Expand Down
2 changes: 1 addition & 1 deletion crates/rustic_core/src/commands/merge.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ use crate::{
index::{indexer::Indexer, ReadIndex},
repofile::{SnapshotFile, SnapshotSummary},
repository::IndexedTree,
Id, Open, PathList, Progress, ProgressBars, Repository, RusticResult,
Id, PathList, Progress, ProgressBars, Repository, RusticResult,
};

pub(crate) fn merge_snapshots<P: ProgressBars, S: IndexedTree>(
Expand Down
3 changes: 2 additions & 1 deletion crates/rustic_core/src/commands/repair/index.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ use crate::{
error::CommandErrorKind,
index::indexer::Indexer,
repofile::{IndexFile, IndexPack, PackHeader, PackHeaderRef},
Open, Progress, ProgressBars, Repository, RusticResult,
repository::Open,
Progress, ProgressBars, Repository, RusticResult,
};

#[cfg_attr(feature = "clap", derive(clap::Parser))]
Expand Down
2 changes: 1 addition & 1 deletion crates/rustic_core/src/commands/repair/snapshots.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ use crate::{
index::{indexer::Indexer, IndexedBackend, ReadIndex},
repofile::SnapshotFile,
repository::{IndexedFull, IndexedTree},
Id, Open, ProgressBars, Repository, RusticResult, StringList,
Id, ProgressBars, Repository, RusticResult, StringList,
};

#[cfg_attr(feature = "clap", derive(clap::Parser))]
Expand Down
4 changes: 2 additions & 2 deletions crates/rustic_core/src/commands/restore.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ use crate::{
},
blob::BlobType,
error::CommandErrorKind,
repository::{IndexedFull, IndexedTree},
Id, LocalDestination, Open, Progress, ProgressBars, Repository, RusticResult,
repository::{IndexedFull, IndexedTree, Open},
Id, LocalDestination, Progress, ProgressBars, Repository, RusticResult,
};

pub(crate) mod constants {
Expand Down
2 changes: 1 addition & 1 deletion crates/rustic_core/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -128,5 +128,5 @@ pub use crate::{
repofile::snapshotfile::{
PathList, SnapshotGroup, SnapshotGroupCriterion, SnapshotOptions, StringList,
},
repository::{IndexedFull, Open, OpenStatus, Repository, RepositoryOptions},
repository::{IndexedFull, OpenStatus, Repository, RepositoryOptions},
};
1 change: 1 addition & 0 deletions crates/rustic_core/src/repofile/snapshotfile.rs
Original file line number Diff line number Diff line change
Expand Up @@ -756,6 +756,7 @@ impl StringList {
self.0.join("\n")
}

/// Turn StringList into an Iterator

Check failure on line 759 in crates/rustic_core/src/repofile/snapshotfile.rs

View workflow job for this annotation

GitHub Actions / Clippy Output

item in documentation is missing backticks

error: item in documentation is missing backticks --> crates/rustic_core/src/repofile/snapshotfile.rs:759:14 | 759 | /// Turn StringList into an Iterator | ^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_markdown help: try | 759 | /// Turn `StringList` into an Iterator | ~~~~~~~~~~~~
pub fn iter(&self) -> std::slice::Iter<'_, String> {
self.0.iter()
}
Expand Down
Loading

0 comments on commit 91b8c8d

Please sign in to comment.