Commit 05aaf93f authored by zhangjinpeng1987's avatar zhangjinpeng1987 Committed by dorianzheng

Impl display compaction reason (#244)

* impl display for compaction_reason
Signed-off-by: 's avatarzhangjinpeng1987 <zhangjinpeng@pingcap.com>

* format code
Signed-off-by: 's avatarzhangjinpeng1987 <zhangjinpeng@pingcap.com>
parent 064ab221
......@@ -20,6 +20,7 @@ extern crate tempdir;
use libc::{c_char, c_double, c_int, c_uchar, c_void, size_t, uint32_t, uint64_t, uint8_t};
use std::ffi::CStr;
use std::fmt;
pub enum Options {}
pub enum ColumnFamilyDescriptor {}
......@@ -202,6 +203,12 @@ pub enum CompactionReason {
NumOfReasons,
}
impl fmt::Display for CompactionReason {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{:?}", self)
}
}
#[derive(Copy, Clone, Debug, Eq, PartialEq)]
#[repr(C)]
pub enum DBInfoLogLevel {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment