Skip to content

Commit

Permalink
Address review comments
Browse files Browse the repository at this point in the history
Signed-off-by: boxdot <[email protected]>
  • Loading branch information
boxdot committed Aug 28, 2022
1 parent 0bef56e commit c15ecf2
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
3 changes: 2 additions & 1 deletion flatdata-rs/lib/src/arrayview.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ mod test {
};

#[test]
#[allow(clippy::reversed_empty_ranges)]
fn range() {
let mut vec: Vector<R> = Vector::with_len(3);
vec[0].set_first_x(10);
Expand All @@ -66,7 +67,7 @@ mod test {
assert_eq!(vec.len(), 3);
assert_eq!(vec[0].x(), 10..20);
assert_eq!(vec[1].x(), 20..30);
assert!(vec[2].x().is_empty());
assert_eq!(vec[2].x(), 30..0);

assert_eq!(vec[0..1].len(), 1);
assert_eq!(vec[0..1][0].x(), 10..20);
Expand Down
3 changes: 2 additions & 1 deletion flatdata-rs/lib/src/structs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,8 @@ mod test {
}

#[test]
#[allow(clippy::assertions_on_constants)]
fn test_range() {
const _: [(); 0 - !{ <R as Struct>::IS_OVERLAPPING_WITH_NEXT } as usize] = [];
assert!(<R as Struct>::IS_OVERLAPPING_WITH_NEXT);
}
}
3 changes: 2 additions & 1 deletion flatdata-rs/lib/src/vector.rs
Original file line number Diff line number Diff line change
Expand Up @@ -341,6 +341,7 @@ mod tests {
}

#[test]
#[allow(clippy::reversed_empty_ranges)]
fn test_vector_range() {
let mut v: Vector<R> = Vector::with_len(3);
v[0].set_first_x(10);
Expand All @@ -349,7 +350,7 @@ mod tests {

assert_eq!(v[0].x(), 10..20);
assert_eq!(v[1].x(), 20..30);
assert!(v[2].x().is_empty());
assert_eq!(v[2].x(), 30..0);
}

#[test]
Expand Down

0 comments on commit c15ecf2

Please sign in to comment.