@@ -58,27 +58,26 @@ pub enum BasicValueType {
5858impl std:: fmt:: Display for BasicValueType {
5959 fn fmt ( & self , f : & mut std:: fmt:: Formatter < ' _ > ) -> std:: fmt:: Result {
6060 match self {
61- BasicValueType :: Bytes => write ! ( f, "bytes" ) ,
62- BasicValueType :: Str => write ! ( f, "str" ) ,
63- BasicValueType :: Bool => write ! ( f, "bool" ) ,
64- BasicValueType :: Int64 => write ! ( f, "int64" ) ,
65- BasicValueType :: Float32 => write ! ( f, "float32" ) ,
66- BasicValueType :: Float64 => write ! ( f, "float64" ) ,
67- BasicValueType :: Range => write ! ( f, "range" ) ,
68- BasicValueType :: Uuid => write ! ( f, "uuid" ) ,
69- BasicValueType :: Date => write ! ( f, "date" ) ,
70- BasicValueType :: Time => write ! ( f, "time" ) ,
71- BasicValueType :: LocalDateTime => write ! ( f, "local_datetime" ) ,
72- BasicValueType :: OffsetDateTime => write ! ( f, "offset_datetime" ) ,
73- BasicValueType :: Json => write ! ( f, "json" ) ,
74- BasicValueType :: Vector ( s) => write ! (
75- f,
76- "vector({}, {})" ,
77- s. dimension
78- . map( |d| d. to_string( ) )
79- . unwrap_or_else( || "*" . to_string( ) ) ,
80- s. element_type
81- ) ,
61+ BasicValueType :: Bytes => write ! ( f, "Bytes" ) ,
62+ BasicValueType :: Str => write ! ( f, "Str" ) ,
63+ BasicValueType :: Bool => write ! ( f, "Bool" ) ,
64+ BasicValueType :: Int64 => write ! ( f, "Int64" ) ,
65+ BasicValueType :: Float32 => write ! ( f, "Float32" ) ,
66+ BasicValueType :: Float64 => write ! ( f, "Float64" ) ,
67+ BasicValueType :: Range => write ! ( f, "Range" ) ,
68+ BasicValueType :: Uuid => write ! ( f, "Uuid" ) ,
69+ BasicValueType :: Date => write ! ( f, "Date" ) ,
70+ BasicValueType :: Time => write ! ( f, "Time" ) ,
71+ BasicValueType :: LocalDateTime => write ! ( f, "LocalDateTime" ) ,
72+ BasicValueType :: OffsetDateTime => write ! ( f, "OffsetDateTime" ) ,
73+ BasicValueType :: Json => write ! ( f, "Json" ) ,
74+ BasicValueType :: Vector ( s) => {
75+ write ! ( f, "Vector[{}" , s. element_type) ?;
76+ if let Some ( dimension) = s. dimension {
77+ write ! ( f, ", {}" , dimension) ?;
78+ }
79+ write ! ( f, "]" )
80+ }
8281 }
8382 }
8483}
0 commit comments