Skip to content

Commit

Permalink
adjust imports
Browse files Browse the repository at this point in the history
  • Loading branch information
JojiiOfficial committed Apr 25, 2024
1 parent f88afa8 commit 4300287
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
10 changes: 5 additions & 5 deletions src/error.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use crate::qdrant::value::Kind;
use crate::qdrant::value::Kind::*;
use crate::qdrant::{ListValue, Struct, Value};
use std::error::Error;
use std::fmt::{Debug, Display, Formatter};
Expand Down Expand Up @@ -64,7 +64,7 @@ impl TryFrom<Value> for bool {
type Error = NotA<bool>;

fn try_from(v: Value) -> Result<Self, NotA<bool>> {
if let Some(Kind::BoolValue(t)) = v.kind {
if let Some(BoolValue(t)) = v.kind {
Ok(t)
} else {
Err(NotA::default())
Expand All @@ -91,7 +91,7 @@ impl TryFrom<Value> for i64 {
type Error = NotA<i64>;

fn try_from(v: Value) -> Result<Self, NotA<i64>> {
if let Some(Kind::IntegerValue(t)) = v.kind {
if let Some(IntegerValue(t)) = v.kind {
Ok(t)
} else {
Err(NotA::default())
Expand All @@ -118,7 +118,7 @@ impl TryFrom<Value> for f64 {
type Error = NotA<f64>;

fn try_from(v: Value) -> Result<Self, NotA<f64>> {
if let Some(Kind::DoubleValue(t)) = v.kind {
if let Some(DoubleValue(t)) = v.kind {
Ok(t)
} else {
Err(NotA::default())
Expand All @@ -145,7 +145,7 @@ impl TryFrom<Value> for String {
type Error = NotA<String>;

fn try_from(v: Value) -> Result<Self, NotA<String>> {
if let Some(Kind::StringValue(t)) = v.kind {
if let Some(StringValue(t)) = v.kind {
Ok(t)
} else {
Err(NotA::default())
Expand Down
3 changes: 1 addition & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,7 @@ pub mod serde;

use error::NotA;
use qdrant::{value::Kind::*, ListValue, RetrievedPoint, ScoredPoint, Struct, Value};
use std::error::Error;
use std::fmt::{Debug, Display, Formatter};
use std::fmt::{Display, Formatter};
use std::hash::{Hash, Hasher};

#[doc(no_inline)]
Expand Down

0 comments on commit 4300287

Please sign in to comment.