MCPcopy Create free account
hub / github.com/astral-sh/ruff / assert_eq_slice

Function assert_eq_slice

crates/ty_python_semantic/src/subscript.rs:318–330  ·  view source on GitHub ↗
(
        db: &dyn Db,
        input: &[char; N],
        start: Option<i32>,
        stop: Option<i32>,
        step: Option<i32>,
        expected: &[char; M],
    )

Source from the content-addressed store, hash-verified

316
317 #[track_caller]
318 fn assert_eq_slice<const N: usize, const M: usize>(
319 db: &dyn Db,
320 input: &[char; N],
321 start: Option<i32>,
322 stop: Option<i32>,
323 step: Option<i32>,
324 expected: &[char; M],
325 ) {
326 assert_equal(
327 input.py_slice(db, start, stop, step).unwrap().collect_vec(),
328 expected.iter().copied().collect_vec(),
329 );
330 }
331
332 #[test]
333 fn py_slice_empty_input() {

Calls 3

collect_vecMethod · 0.80
py_sliceMethod · 0.45
iterMethod · 0.45