Skip to content

Commit dad152a

Browse files
committed
kDefaultRegression: make const
1 parent 3e70535 commit dad152a

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

programs/zstdcli.rs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -857,7 +857,7 @@ unsafe fn longCommandWArg(
857857
}
858858
result
859859
}
860-
static mut kDefaultRegression: core::ffi::c_uint = 1;
860+
const kDefaultRegression: core::ffi::c_uint = 1;
861861
unsafe fn parseCoverParameters(
862862
mut stringPtr: *const core::ffi::c_char,
863863
params: *mut ZDICT_cover_params_t,
@@ -1082,7 +1082,8 @@ unsafe fn parseLegacyParameters(
10821082
}
10831083
1
10841084
}
1085-
unsafe fn defaultCoverParams() -> ZDICT_cover_params_t {
1085+
1086+
fn defaultCoverParams() -> ZDICT_cover_params_t {
10861087
let mut params = ZDICT_cover_params_t::default();
10871088
params.d = 8;
10881089
params.steps = 4;
@@ -1091,7 +1092,8 @@ unsafe fn defaultCoverParams() -> ZDICT_cover_params_t {
10911092
params.shrinkDictMaxRegression = kDefaultRegression;
10921093
params
10931094
}
1094-
unsafe fn defaultFastCoverParams() -> ZDICT_fastCover_params_t {
1095+
1096+
fn defaultFastCoverParams() -> ZDICT_fastCover_params_t {
10951097
let mut params = ZDICT_fastCover_params_t::default();
10961098
params.d = 8;
10971099
params.f = 20;
@@ -1102,6 +1104,7 @@ unsafe fn defaultFastCoverParams() -> ZDICT_fastCover_params_t {
11021104
params.shrinkDictMaxRegression = kDefaultRegression;
11031105
params
11041106
}
1107+
11051108
unsafe fn parseAdaptParameters(
11061109
mut stringPtr: *const core::ffi::c_char,
11071110
adaptMinPtr: *mut core::ffi::c_int,

0 commit comments

Comments
 (0)