ensure doctests are not elided by linker

opts.set_disable_data_sync was removed from RocksDB (commit eb912a9),
but our doctest didn't fail because the function opts.set_disable_data_sync
was called in, badly_tuned_for_somebody_elses_disk, was elided by the linker.
Remove this function to ensure the doctest actually exercises the code
path.
master
Nikhil Benesch 7 years ago
parent 9002fbda95
commit 633caccace
No known key found for this signature in database
GPG Key ID: C5779C9897F0FCCB
  1. 5
      src/lib.rs

@ -119,8 +119,6 @@ pub struct BlockBasedOptions {
/// use rocksdb::{Options, DB}; /// use rocksdb::{Options, DB};
/// use rocksdb::DBCompactionStyle; /// use rocksdb::DBCompactionStyle;
/// ///
/// fn badly_tuned_for_somebody_elses_disk() -> DB {
/// let path = "path/for/rocksdb/storageX";
/// let mut opts = Options::default(); /// let mut opts = Options::default();
/// opts.create_if_missing(true); /// opts.create_if_missing(true);
/// opts.set_max_open_files(10000); /// opts.set_max_open_files(10000);
@ -139,9 +137,6 @@ pub struct BlockBasedOptions {
/// opts.set_max_background_compactions(4); /// opts.set_max_background_compactions(4);
/// opts.set_max_background_flushes(4); /// opts.set_max_background_flushes(4);
/// opts.set_disable_auto_compactions(true); /// opts.set_disable_auto_compactions(true);
///
/// DB::open(&opts, path).unwrap()
/// }
/// ``` /// ```
pub struct Options { pub struct Options {
inner: *mut ffi::rocksdb_options_t, inner: *mut ffi::rocksdb_options_t,

Loading…
Cancel
Save