Skip to content

Commit 91850a4

Browse files
committed
fmt
1 parent 5dae85d commit 91850a4

File tree

5 files changed

+19
-15
lines changed

5 files changed

+19
-15
lines changed

src/builders/binary_quantization_builder.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,9 @@ impl From<String> for BinaryQuantizationBuilderError {
119119
impl BinaryQuantizationQueryEncoding {
120120
pub fn new_setting(setting: binary_quantization_query_encoding::Setting) -> Self {
121121
Self {
122-
variant: Some(binary_quantization_query_encoding::Variant::Setting(setting.into())),
122+
variant: Some(binary_quantization_query_encoding::Variant::Setting(
123+
setting.into(),
124+
)),
123125
}
124126
}
125127
}

src/builders/mmr_builder.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,6 @@ impl MmrBuilder {
5252
/// Must be in the range [0, 1].
5353
/// Default value is 0.5.
5454
pub fn diversity(self, value: f32) -> Self {
55-
if value < 0.0 || value > 1.0 {
56-
panic!("Diversity must be in the range [0, 1], got: {}", value);
57-
}
5855
let mut new = self;
5956
new.diversity = Option::Some(Option::Some(value));
6057
new
@@ -69,7 +66,7 @@ impl MmrBuilder {
6966
new
7067
}
7168

72-
fn build(self) -> Mmr{
69+
fn build(self) -> Mmr {
7370
Mmr {
7471
diversity: self.diversity.unwrap_or_default(),
7572
candidates_limit: self.candidates_limit.unwrap_or_default(),

src/client/points.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,13 @@ use crate::qdrant::{
1212
shard_key, ClearPayloadPoints, CountPoints, CountResponse, CreateFieldIndexCollection,
1313
DeleteFieldIndexCollection, DeletePayloadPoints, DeletePointVectors, DeletePoints,
1414
DiscoverBatchPoints, DiscoverBatchResponse, DiscoverPoints, DiscoverResponse, FieldType,
15-
GetPoints, GetResponse, PayloadIndexParams, PointId, PointVectors,
16-
PointsOperationResponse, PointsSelector, PointsUpdateOperation, ReadConsistency,
17-
RecommendBatchPoints, RecommendBatchResponse, RecommendGroupsResponse, RecommendPointGroups,
18-
RecommendPoints, RecommendResponse, ScrollPoints, ScrollResponse, SearchBatchPoints,
19-
SearchBatchResponse, SearchGroupsResponse, SearchPointGroups, SearchResponse, SetPayloadPoints,
20-
ShardKeySelector, UpdateBatchPoints, UpdateBatchResponse, UpdatePointVectors, UpsertPoints,
21-
Usage, VectorsSelector, WithPayloadSelector, WithVectorsSelector, WriteOrdering,
15+
GetPoints, GetResponse, PayloadIndexParams, PointId, PointVectors, PointsOperationResponse,
16+
PointsSelector, PointsUpdateOperation, ReadConsistency, RecommendBatchPoints,
17+
RecommendBatchResponse, RecommendGroupsResponse, RecommendPointGroups, RecommendPoints,
18+
RecommendResponse, ScrollPoints, ScrollResponse, SearchBatchPoints, SearchBatchResponse,
19+
SearchGroupsResponse, SearchPointGroups, SearchResponse, SetPayloadPoints, ShardKeySelector,
20+
UpdateBatchPoints, UpdateBatchResponse, UpdatePointVectors, UpsertPoints, Usage,
21+
VectorsSelector, WithPayloadSelector, WithVectorsSelector, WriteOrdering,
2222
};
2323

2424
impl QdrantClient {

src/filters.rs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -463,8 +463,12 @@ impl std::ops::Not for MatchValue {
463463
Self::Integers(is) => Self::ExceptIntegers(is),
464464
Self::ExceptKeywords(ks) => Self::Keywords(ks),
465465
Self::ExceptIntegers(is) => Self::Integers(is),
466-
Self::Text(_) => panic!("cannot negate a MatchValue::Text, use within must_not clause instead"),
467-
Self::Phrase(_) => panic!("cannot negate a MatchValue::Phrase, use within must_not clause instead"),
466+
Self::Text(_) => {
467+
panic!("cannot negate a MatchValue::Text, use within must_not clause instead")
468+
}
469+
Self::Phrase(_) => {
470+
panic!("cannot negate a MatchValue::Phrase, use within must_not clause instead")
471+
}
468472
}
469473
}
470474
}

src/grpc_conversions/extensions.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -428,9 +428,10 @@ impl ModelUsage {
428428

429429
#[cfg(test)]
430430
mod tests {
431-
use super::*;
432431
use std::collections::HashMap;
433432

433+
use super::*;
434+
434435
#[test]
435436
fn test_inference_usage_aggregation() {
436437
let mut models1 = HashMap::new();

0 commit comments

Comments
 (0)