Skip to content

Commit c8ea241

Browse files
committed
more
1 parent edce927 commit c8ea241

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/sys/mod.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -166,29 +166,29 @@ unsafe fn tsk_ragged_column_access_detail<
166166
if row < 0 || row as bindings::tsk_size_t > column_length || offset_length == 0 {
167167
None
168168
} else {
169-
assert!(!column.is_null());
170-
assert!(!offset.is_null());
171169
// SAFETY: pointers are not null
172170
// and *_length are given by tskit-c
173171
let index = row as isize;
174-
let start = unsafe { *offset.offset(index) };
172+
let start = *offset.offset(index);
175173
let stop = if (row as bindings::tsk_size_t) < column_length {
176-
unsafe { *offset.offset(index + 1) }
174+
*offset.offset(index + 1)
177175
} else {
178176
offset_length
179177
};
180178
if start == stop {
181179
None
182180
} else {
183181
Some((
184-
unsafe { column.offset(start as isize) },
182+
column.offset(start as isize),
185183
stop as usize - start as usize,
186184
))
187185
}
188186
}
189187
}
190188

191189
// SAFETY: see tsk_ragged_column_access_detail
190+
// We further erquire that a pointer to a T can
191+
// be safely cast to a pointer to an O.
192192
pub unsafe fn tsk_ragged_column_access<
193193
'a,
194194
O,

0 commit comments

Comments
 (0)