remove some conditional compilation

Signed-off-by: strawberry <strawberry@puppygock.gay>
This commit is contained in:
strawberry 2024-03-14 19:41:10 -04:00 committed by June
parent 8e3b9a3d17
commit 1bfc5336f7

View file

@ -471,37 +471,29 @@ fn default_presence_idle_timeout_s() -> u64 { 5 * 60 }
fn default_presence_offline_timeout_s() -> u64 { 30 * 60 } fn default_presence_offline_timeout_s() -> u64 { 30 * 60 }
#[cfg(feature = "rocksdb")]
fn default_rocksdb_log_level() -> String { "error".to_owned() } fn default_rocksdb_log_level() -> String { "error".to_owned() }
#[cfg(feature = "rocksdb")]
fn default_rocksdb_log_time_to_roll() -> usize { 0 } fn default_rocksdb_log_time_to_roll() -> usize { 0 }
#[cfg(feature = "rocksdb")]
fn default_rocksdb_max_log_files() -> usize { 3 } fn default_rocksdb_max_log_files() -> usize { 3 }
#[cfg(feature = "rocksdb")]
fn default_rocksdb_max_log_file_size() -> usize { fn default_rocksdb_max_log_file_size() -> usize {
// 4 megabytes // 4 megabytes
4 * 1024 * 1024 4 * 1024 * 1024
} }
#[cfg(feature = "rocksdb")]
fn default_rocksdb_parallelism_threads() -> usize { num_cpus::get_physical() / 2 } fn default_rocksdb_parallelism_threads() -> usize { num_cpus::get_physical() / 2 }
#[cfg(feature = "rocksdb")]
fn default_rocksdb_compression_algo() -> String { "zstd".to_owned() } fn default_rocksdb_compression_algo() -> String { "zstd".to_owned() }
/// Default RocksDB compression level is 32767, which is internally read by /// Default RocksDB compression level is 32767, which is internally read by
/// RocksDB as the default magic number and translated to the library's default /// RocksDB as the default magic number and translated to the library's default
/// compression level as they all differ. See their `kDefaultCompressionLevel`. /// compression level as they all differ. See their `kDefaultCompressionLevel`.
#[cfg(feature = "rocksdb")]
fn default_rocksdb_compression_level() -> i32 { 32767 } fn default_rocksdb_compression_level() -> i32 { 32767 }
/// Default RocksDB compression level is 32767, which is internally read by /// Default RocksDB compression level is 32767, which is internally read by
/// RocksDB as the default magic number and translated to the library's default /// RocksDB as the default magic number and translated to the library's default
/// compression level as they all differ. See their `kDefaultCompressionLevel`. /// compression level as they all differ. See their `kDefaultCompressionLevel`.
#[cfg(feature = "rocksdb")]
fn default_rocksdb_bottommost_compression_level() -> i32 { 32767 } fn default_rocksdb_bottommost_compression_level() -> i32 { 32767 }
// I know, it's a great name // I know, it's a great name