-
Notifications
You must be signed in to change notification settings - Fork 15
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
feat: Add methods for repairing hot/cold repositories #255
base: main
Are you sure you want to change the base?
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files
|
9327d83
to
1b5fb66
Compare
Merged main into it, because the test coverage failure is fixed there. |
The failing test is due to missing tests... |
/// * `config` - The config to use. | ||
/// * `repo` - The repository to save the config to | ||
/// * `new_config` - The config to save | ||
/// * `key` - The key to encrypt the config with |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/// * `key` - The key to encrypt the config with | |
/// * `key_opts` - The options to create the key with. |
/// # Returns | ||
/// # Errors | ||
/// | ||
/// * [`CryptBackendErrorKind::SerializingToJsonByteVectorFailed`] - If the file could not be serialized to json. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/// * [`CryptBackendErrorKind::SerializingToJsonByteVectorFailed`] - If the file could not be serialized to json. | |
/// * If the file could not be serialized to json. |
/// | ||
/// The key used to encrypt the config. | ||
/// [`CryptBackendErrorKind::SerializingToJsonByteVectorFailed`]: crate::error::CryptBackendErrorKind::SerializingToJsonByteVectorFailed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/// [`CryptBackendErrorKind::SerializingToJsonByteVectorFailed`]: crate::error::CryptBackendErrorKind::SerializingToJsonByteVectorFailed |
@@ -1,2 +1,3 @@ | |||
pub mod hotcold; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pub mod hotcold; | |
pub mod hot_cold; |
I think two separate words value an underscore.
RusticResult, WriteBackend, ALL_FILE_TYPES, | ||
}; | ||
|
||
pub(crate) fn repair_hotcold<P: ProgressBars, S>( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pub(crate) fn repair_hotcold<P: ProgressBars, S>( | |
pub(crate) fn repair_hot_cold<P: ProgressBars, S>( |
same
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A bit of documentation for this new function would be lovely as well 🚀
Ok(()) | ||
} | ||
|
||
pub(crate) fn get_tree_packs<P: ProgressBars, S: Open>( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A bit of documentation for this new function would be lovely as well 🚀
Ok(tree_packs) | ||
} | ||
|
||
pub(crate) fn get_missing_files<P: ProgressBars, S>( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A bit of documentation for this new function would be lovely as well 🚀
/// | ||
/// # Errors | ||
/// | ||
/// * [`CryptBackendErrorKind::SerializingToJsonByteVectorFailed`] - If the file could not be serialized to json. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/// * [`CryptBackendErrorKind::SerializingToJsonByteVectorFailed`] - If the file could not be serialized to json. | |
/// * If the file could not be serialized to json. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
C&P, please check if the errors make sense
/// | ||
/// [`CryptBackendErrorKind::SerializingToJsonByteVectorFailed`]: crate::error::CryptBackendErrorKind::SerializingToJsonByteVectorFailed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/// | |
/// [`CryptBackendErrorKind::SerializingToJsonByteVectorFailed`]: crate::error::CryptBackendErrorKind::SerializingToJsonByteVectorFailed |
/// | ||
/// # Type Parameters | ||
/// | ||
/// * `P` - The progress bar type. | ||
/// * `S` - The state the repository is in. | ||
/// | ||
/// # Arguments | ||
/// | ||
/// * `repo` - The repository to save the config to | ||
/// * `new_config` - The config to save | ||
/// * `key` - The key to encrypt the config with |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/// | |
/// # Type Parameters | |
/// | |
/// * `P` - The progress bar type. | |
/// * `S` - The state the repository is in. | |
/// | |
/// # Arguments | |
/// | |
/// * `repo` - The repository to save the config to | |
/// * `new_config` - The config to save | |
/// * `key` - The key to encrypt the config with |
First read through, for raw structure. Will read through it again for typos and impl. EDIT: Can help fix the docs |
No description provided.