Verify the trait impl compiles via a generic function.
(c: &C, q: &[f32], v: &[f32])
| 156 | |
| 157 | /// Verify the trait impl compiles via a generic function. |
| 158 | fn use_vector_codec<C: VectorCodec>(c: &C, q: &[f32], v: &[f32]) -> f32 { |
| 159 | let qv = c.encode(v); |
| 160 | let qq = c.prepare_query(q); |
| 161 | c.fast_symmetric_distance(&qv, &qv) + c.exact_asymmetric_distance(&qq, &qv) |
| 162 | } |
| 163 | |
| 164 | #[test] |
| 165 | fn trait_bounds_compile() { |