rename array to list in rust types

This commit is contained in:
Dustin J. Mitchell
2022-02-12 15:20:46 +00:00
parent e9cd6adc5b
commit f81c4eec90
6 changed files with 37 additions and 37 deletions

View File

@@ -56,7 +56,7 @@ pub struct TCUuidList {
items: *const TCUuid,
}
impl CArray for TCUuidList {
impl CList for TCUuidList {
type Element = TCUuid;
unsafe fn from_raw_parts(items: *const Self::Element, len: usize, cap: usize) -> Self {
@@ -134,7 +134,7 @@ pub unsafe extern "C" fn tc_uuid_list_free(tcuuids: *mut TCUuidList) {
// - tcuuids is not NULL and points to a valid TCUuidList (caller is not allowed to
// modify the list)
// - caller promises not to use the value after return
unsafe { drop_value_array(tcuuids) };
unsafe { drop_value_list(tcuuids) };
}
#[cfg(test)]
@@ -142,7 +142,7 @@ mod test {
use super::*;
#[test]
fn empty_array_has_non_null_pointer() {
fn empty_list_has_non_null_pointer() {
let tcuuids = TCUuidList::return_val(Vec::new());
assert!(!tcuuids.items.is_null());
assert_eq!(tcuuids.len, 0);