Summary
The examples in README.md of rustic_core 0.11.0 still demonstrate the pre-0.11 API and don't compile against the current version.
Reproduce
Following the README "Initializing a Repository" section verbatim:
let repo_opts = RepositoryOptions::default().password("test");
let repo = Repository::new(&repo_opts, backends)?.open()?;
…produces:
error[E0599]: no method named `password` found for struct `RepositoryOptions`
What changed in 0.11
RepositoryOptions no longer exposes a .password() setter — credentials moved to a dedicated Credentials enum.
Repository::open() now requires &Credentials.
Repository::init() now takes (&Credentials, &KeyOptions, &ConfigOptions).
The working 0.11 form is:
let creds = Credentials::Password("test".into());
let repo = Repository::new(&RepositoryOptions::default(), &backends)?.open(&creds)?;
Suggestion
Update the four code blocks in the README ("Initializing", "Creating snapshot", "Restoring", "Checking") to the current API. A short migration note from 0.10 → 0.11 in the changelog or a top-level note in the README would also help anyone bumping the version.
Happy to send a PR if there's interest.
Summary
The examples in
README.mdofrustic_core0.11.0 still demonstrate the pre-0.11 API and don't compile against the current version.Reproduce
Following the README "Initializing a Repository" section verbatim:
…produces:
What changed in 0.11
RepositoryOptionsno longer exposes a.password()setter — credentials moved to a dedicatedCredentialsenum.Repository::open()now requires&Credentials.Repository::init()now takes(&Credentials, &KeyOptions, &ConfigOptions).The working 0.11 form is:
Suggestion
Update the four code blocks in the README ("Initializing", "Creating snapshot", "Restoring", "Checking") to the current API. A short migration note from 0.10 → 0.11 in the changelog or a top-level note in the README would also help anyone bumping the version.
Happy to send a PR if there's interest.