fix: use cfg to fix compiler warning for opts

Fixes #1621.
This commit is contained in:
ezera
2026-04-07 12:58:23 +00:00
committed by Ellis Git
parent 2e62ca93a8
commit 38b4065270
2 changed files with 7 additions and 4 deletions
+1
View File
@@ -0,0 +1 @@
Fixed compiler warning in cf_opts.rs when building in release. Contributed by @ezera.
+6 -4
View File
@@ -70,17 +70,19 @@ fn descriptor_cf_options(
); );
} }
let mut opts = opts let opts = opts
.get_options_from_string("{{arena_block_size=2097152;}}") .get_options_from_string("{{arena_block_size=2097152;}}")
.map_err(map_err)?; .map_err(map_err)?;
#[cfg(debug_assertions)] #[cfg(debug_assertions)]
let opts = opts let opts = {
.get_options_from_string( let mut opts = opts;
opts.get_options_from_string(
"{{paranoid_checks=true;paranoid_file_checks=true;force_consistency_checks=true;\ "{{paranoid_checks=true;paranoid_file_checks=true;force_consistency_checks=true;\
verify_sst_unique_id_in_manifest=true;}}", verify_sst_unique_id_in_manifest=true;}}",
) )
.map_err(map_err)?; .map_err(map_err)?
};
Ok(opts) Ok(opts)
} }