From 9d87b897186aa77f0be82a2b5c5d0ebd8664a5dd Mon Sep 17 00:00:00 2001 From: Kanji Yomoda Date: Fri, 3 Sep 2021 10:37:16 +0900 Subject: [PATCH] Fix incorrect comment for Index::create_in_dir (#1148) * Fix incorrect comment for Index::create_in_dir --- src/core/index.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/core/index.rs b/src/core/index.rs index 4ad143219..65f00fa18 100644 --- a/src/core/index.rs +++ b/src/core/index.rs @@ -120,7 +120,7 @@ impl IndexBuilder { /// Creates a new index in a given filepath. /// The index will use the `MMapDirectory`. /// - /// If a previous index was in this directory, then its meta file will be destroyed. + /// If a previous index was in this directory, it returns an `IndexAlreadyExists` error. #[cfg(feature = "mmap")] pub fn create_in_dir>(self, directory_path: P) -> crate::Result { let mmap_directory = MmapDirectory::open(directory_path)?; @@ -238,7 +238,7 @@ impl Index { /// Creates a new index in a given filepath. /// The index will use the `MMapDirectory`. /// - /// If a previous index was in this directory, then its meta file will be destroyed. + /// If a previous index was in this directory, then it returns an `IndexAlreadyExists` error. #[cfg(feature = "mmap")] pub fn create_in_dir>( directory_path: P,