summaryrefslogtreecommitdiffstats
path: root/src/core/segment_meta.rs
diff options
context:
space:
mode:
authorPaul Masurel <paul.masurel@gmail.com>2017-08-28 17:42:26 +0900
committerPaul Masurel <paul.masurel@gmail.com>2017-08-28 18:22:41 +0900
commitf8710bd4b0b914d37be2671d92d67a4e5fbd941b (patch)
tree48adfbbbd984a7011ff3e9990a24052d0bb4d1da /src/core/segment_meta.rs
parent8d05b8f7b217e877622524e9507bc7f00c82a476 (diff)
Format
Diffstat (limited to 'src/core/segment_meta.rs')
-rw-r--r--src/core/segment_meta.rs24
1 files changed, 11 insertions, 13 deletions
diff --git a/src/core/segment_meta.rs b/src/core/segment_meta.rs
index 623b224..1abe956 100644
--- a/src/core/segment_meta.rs
+++ b/src/core/segment_meta.rs
@@ -64,16 +64,14 @@ impl SegmentMeta {
pub fn relative_path(&self, component: SegmentComponent) -> PathBuf {
let mut path = self.id().uuid_string();
path.push_str(&*match component {
- SegmentComponent::POSITIONS => ".pos".to_string(),
- SegmentComponent::POSTINGS => ".idx".to_string(),
- SegmentComponent::TERMS => ".term".to_string(),
- SegmentComponent::STORE => ".store".to_string(),
- SegmentComponent::FASTFIELDS => ".fast".to_string(),
- SegmentComponent::FIELDNORMS => ".fieldnorm".to_string(),
- SegmentComponent::DELETE => {
- format!(".{}.del", self.delete_opstamp().unwrap_or(0))
- }
- });
+ SegmentComponent::POSITIONS => ".pos".to_string(),
+ SegmentComponent::POSTINGS => ".idx".to_string(),
+ SegmentComponent::TERMS => ".term".to_string(),
+ SegmentComponent::STORE => ".store".to_string(),
+ SegmentComponent::FASTFIELDS => ".fast".to_string(),
+ SegmentComponent::FIELDNORMS => ".fieldnorm".to_string(),
+ SegmentComponent::DELETE => format!(".{}.del", self.delete_opstamp().unwrap_or(0)),
+ });
PathBuf::from(path)
}
@@ -111,8 +109,8 @@ impl SegmentMeta {
#[doc(hidden)]
pub fn set_delete_meta(&mut self, num_deleted_docs: u32, opstamp: u64) {
self.deletes = Some(DeleteMeta {
- num_deleted_docs: num_deleted_docs,
- opstamp: opstamp,
- });
+ num_deleted_docs: num_deleted_docs,
+ opstamp: opstamp,
+ });
}
}