Skip to content

Commit de88e02

Browse files
committed
Improve function names
More consistent with similar functions
1 parent 026f179 commit de88e02

File tree

3 files changed

+11
-11
lines changed

3 files changed

+11
-11
lines changed

libcrc_fast.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -155,10 +155,10 @@ uint64_t crc_fast_checksum_combine(enum CrcFastAlgorithm algorithm,
155155
/**
156156
* Combine two CRC checksums using custom parameters
157157
*/
158-
uint64_t crc_fast_checksum_combine_with_custom_params(struct CrcFastParams params,
159-
uint64_t checksum1,
160-
uint64_t checksum2,
161-
uint64_t checksum2_len);
158+
uint64_t crc_fast_checksum_combine_with_params(struct CrcFastParams params,
159+
uint64_t checksum1,
160+
uint64_t checksum2,
161+
uint64_t checksum2_len);
162162

163163
/**
164164
* Returns the custom CRC parameters for a given set of Rocksoft CRC parameters

src/ffi.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -422,13 +422,13 @@ pub extern "C" fn crc_fast_checksum_combine(
422422

423423
/// Combine two CRC checksums using custom parameters
424424
#[no_mangle]
425-
pub extern "C" fn crc_fast_checksum_combine_with_custom_params(
425+
pub extern "C" fn crc_fast_checksum_combine_with_params(
426426
params: CrcFastParams,
427427
checksum1: u64,
428428
checksum2: u64,
429429
checksum2_len: u64,
430430
) -> u64 {
431-
crate::checksum_combine_with_custom_params(params.into(), checksum1, checksum2, checksum2_len)
431+
crate::checksum_combine_with_params(params.into(), checksum1, checksum2, checksum2_len)
432432
}
433433

434434
/// Returns the custom CRC parameters for a given set of Rocksoft CRC parameters

src/lib.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -583,7 +583,7 @@ pub fn checksum_combine(
583583
}
584584

585585
/// Combines two CRC checksums using the custom specified parameters.
586-
pub fn checksum_combine_with_custom_params(
586+
pub fn checksum_combine_with_params(
587587
params: CrcParams,
588588
checksum1: u64,
589589
checksum2: u64,
@@ -885,7 +885,7 @@ mod lib {
885885
let checksum1 = checksum_with_params(crc32_params, "1234".as_ref());
886886
let checksum2 = checksum_with_params(crc32_params, "56789".as_ref());
887887
assert_eq!(
888-
checksum_combine_with_custom_params(crc32_params, checksum1, checksum2, 5),
888+
checksum_combine_with_params(crc32_params, checksum1, checksum2, 5),
889889
CRC32_ISCSI.check,
890890
);
891891

@@ -894,7 +894,7 @@ mod lib {
894894
let checksum1 = checksum_with_params(crc32_params, "1234".as_ref());
895895
let checksum2 = checksum_with_params(crc32_params, "56789".as_ref());
896896
assert_eq!(
897-
checksum_combine_with_custom_params(crc32_params, checksum1, checksum2, 5),
897+
checksum_combine_with_params(crc32_params, checksum1, checksum2, 5),
898898
CRC32_BZIP2.check,
899899
);
900900

@@ -903,7 +903,7 @@ mod lib {
903903
let checksum1 = checksum_with_params(crc64_params, "1234".as_ref());
904904
let checksum2 = checksum_with_params(crc64_params, "56789".as_ref());
905905
assert_eq!(
906-
checksum_combine_with_custom_params(crc64_params, checksum1, checksum2, 5),
906+
checksum_combine_with_params(crc64_params, checksum1, checksum2, 5),
907907
CRC64_NVME.check,
908908
);
909909

@@ -912,7 +912,7 @@ mod lib {
912912
let checksum1 = checksum_with_params(crc64_params, "1234".as_ref());
913913
let checksum2 = checksum_with_params(crc64_params, "56789".as_ref());
914914
assert_eq!(
915-
checksum_combine_with_custom_params(crc64_params, checksum1, checksum2, 5),
915+
checksum_combine_with_params(crc64_params, checksum1, checksum2, 5),
916916
CRC64_ECMA_182.check,
917917
);
918918
}

0 commit comments

Comments
 (0)