Skip to content

Commit a6975ce

Browse files
committed
fix: rename init::Error2 to init::Error.
This name was left by mistake and shouldn't have made it into the release.
1 parent 2b08485 commit a6975ce

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/index/init.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ use std::sync::atomic::AtomicBool;
77
/// The error returned by various initialization methods.
88
#[derive(Debug, thiserror::Error)]
99
#[allow(missing_docs)]
10-
pub enum Error2 {
10+
pub enum Error {
1111
#[error(transparent)]
1212
PrepareClone(#[from] git::clone::prepare::Error),
1313
#[error(transparent)]
@@ -38,14 +38,14 @@ impl Index {
3838
///
3939
///
4040
/// let index = Index::from_path_or_cloned_with_options(path, git::progress::Discard, &AtomicBool::default(), options)?;
41-
/// # Ok::<(), crates_index_diff::index::init::Error2>(())
41+
/// # Ok::<(), crates_index_diff::index::init::Error>(())
4242
/// ```
4343
pub fn from_path_or_cloned_with_options(
4444
path: impl AsRef<Path>,
4545
progress: impl git::Progress,
4646
should_interrupt: &AtomicBool,
4747
CloneOptions { url }: CloneOptions,
48-
) -> Result<Index, Error2> {
48+
) -> Result<Index, Error> {
4949
let path = path.as_ref();
5050
let mut repo = match git::open(path) {
5151
Ok(repo) => repo,
@@ -76,7 +76,7 @@ impl Index {
7676
/// clone of the `crates.io` index.
7777
/// If the directory does not contain the repository or does not exist, it will be cloned from
7878
/// the official location automatically (with complete history).
79-
pub fn from_path_or_cloned(path: impl AsRef<Path>) -> Result<Index, Error2> {
79+
pub fn from_path_or_cloned(path: impl AsRef<Path>) -> Result<Index, Error> {
8080
Index::from_path_or_cloned_with_options(
8181
path,
8282
git::progress::Discard,

0 commit comments

Comments
 (0)