Skip to content

Commit 214091a

Browse files
committed
Address review comments
1 parent 0bef56e commit 214091a

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

flatdata-rs/lib/src/arrayview.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ mod test {
5757
};
5858

5959
#[test]
60+
#[allow(clippy::reversed_empty_ranges)]
6061
fn range() {
6162
let mut vec: Vector<R> = Vector::with_len(3);
6263
vec[0].set_first_x(10);
@@ -66,7 +67,7 @@ mod test {
6667
assert_eq!(vec.len(), 3);
6768
assert_eq!(vec[0].x(), 10..20);
6869
assert_eq!(vec[1].x(), 20..30);
69-
assert!(vec[2].x().is_empty());
70+
assert_eq!(vec[2].x(), 30..0);
7071

7172
assert_eq!(vec[0..1].len(), 1);
7273
assert_eq!(vec[0..1][0].x(), 10..20);

flatdata-rs/lib/src/structs.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,8 @@ mod test {
143143
}
144144

145145
#[test]
146+
#[allow(clippy::assertions_on_constants)]
146147
fn test_range() {
147-
const _: [(); 0 - !{ <R as Struct>::IS_OVERLAPPING_WITH_NEXT } as usize] = [];
148+
assert!(<R as Struct>::IS_OVERLAPPING_WITH_NEXT);
148149
}
149150
}

flatdata-rs/lib/src/vector.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -341,6 +341,7 @@ mod tests {
341341
}
342342

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

350351
assert_eq!(v[0].x(), 10..20);
351352
assert_eq!(v[1].x(), 20..30);
352-
assert!(v[2].x().is_empty());
353+
assert_eq!(v[2].x(), 30..0);
353354
}
354355

355356
#[test]

0 commit comments

Comments
 (0)