mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-07-07 20:06:36 +02:00
rename array to list in rust types
This commit is contained in:
parent
e9cd6adc5b
commit
f81c4eec90
6 changed files with 37 additions and 37 deletions
|
@ -172,7 +172,7 @@ pub struct TCTaskList {
|
|||
items: *const NonNull<TCTask>,
|
||||
}
|
||||
|
||||
impl CArray for TCTaskList {
|
||||
impl CList for TCTaskList {
|
||||
type Element = NonNull<TCTask>;
|
||||
|
||||
unsafe fn from_raw_parts(items: *const Self::Element, len: usize, cap: usize) -> Self {
|
||||
|
@ -590,7 +590,7 @@ pub unsafe extern "C" fn tc_task_list_free(tctasks: *mut TCTaskList) {
|
|||
// - tctasks is not NULL and points to a valid TCTaskList (caller is not allowed to
|
||||
// modify the list)
|
||||
// - caller promises not to use the value after return
|
||||
unsafe { drop_pointer_array(tctasks) };
|
||||
unsafe { drop_pointer_list(tctasks) };
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
|
@ -598,7 +598,7 @@ mod test {
|
|||
use super::*;
|
||||
|
||||
#[test]
|
||||
fn empty_array_has_non_null_pointer() {
|
||||
fn empty_list_has_non_null_pointer() {
|
||||
let tctasks = TCTaskList::return_val(Vec::new());
|
||||
assert!(!tctasks.items.is_null());
|
||||
assert_eq!(tctasks.len, 0);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue