From 4596aeda5f4016a5d97d8b183950b4e95a208918 Mon Sep 17 00:00:00 2001 From: Karl Hobley Date: Fri, 28 Oct 2016 11:30:16 +0100 Subject: [PATCH] Convert test_set_max_manifest_file_size into a doctest --- src/rocksdb_options.rs | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/src/rocksdb_options.rs b/src/rocksdb_options.rs index 031269e..76b4159 100644 --- a/src/rocksdb_options.rs +++ b/src/rocksdb_options.rs @@ -418,6 +418,16 @@ impl Options { /// The manifest file is rolled over on reaching this limit. /// The older manifest file be deleted. /// The default value is MAX_INT so that roll-over does not take place. + /// + /// # Example + /// + /// ``` + /// use rocksdb::Options; + /// + /// let mut opts = Options::default(); + /// let size = 20 * 1024 * 1024; + /// opts.set_max_manifest_file_size(size); + /// ``` pub fn set_max_manifest_file_size(&mut self, size: usize) { unsafe { rocksdb_ffi::rocksdb_options_set_max_manifest_file_size(self.inner, size); @@ -681,13 +691,6 @@ impl Default for WriteOptions { mod tests { use super::Options; - #[test] - fn test_set_max_manifest_file_size() { - let mut opts = Options::default(); - let size = 20 * 1024 * 1024; - opts.set_max_manifest_file_size(size) - } - #[test] fn test_enable_statistics() { let mut opts = Options::default();