mirror of
https://github.com/qdrant/qdrant.git
synced 2026-09-30 01:47:56 -05:00
* Remove dead code * Remove unused dependencies * `allow(dead_code)` -> `expect(dead_code)` * ast-grep: rule-tests/*-test.yml => tests/*-test.yml For brevity. * ast-grep: forbid allow(dead_code)
35 lines
693 B
YAML
35 lines
693 B
YAML
id: no-default-batch-methods
|
|
valid:
|
|
# Body-less signature — every implementation chooses explicitly.
|
|
- |
|
|
trait FooRead {
|
|
fn read_batch(&self) -> u32;
|
|
}
|
|
# Non-batch methods may keep default bodies.
|
|
- |
|
|
trait FooRead {
|
|
fn read_one(&self) -> u32 {
|
|
0
|
|
}
|
|
}
|
|
# The universal_io primitives keep their intentional default bodies.
|
|
- |
|
|
trait UniversalRead {
|
|
fn read_batch(&self) -> u32 {
|
|
0
|
|
}
|
|
}
|
|
invalid:
|
|
- |
|
|
trait FooRead {
|
|
fn read_batch(&self) -> u32 {
|
|
0
|
|
}
|
|
}
|
|
- |
|
|
trait ConditionChecker {
|
|
fn check_batched(&self) -> usize {
|
|
0
|
|
}
|
|
}
|