File tree Expand file tree Collapse file tree 2 files changed +4
-8
lines changed Expand file tree Collapse file tree 2 files changed +4
-8
lines changed Original file line number Diff line number Diff line change @@ -364,7 +364,7 @@ impl fmt::Display for Value {
364
364
impl From < Value > for query:: Value {
365
365
fn from ( value : Value ) -> Self {
366
366
match value {
367
- Value :: String ( s) => query:: Value :: String ( s. to_string ( ) ) ,
367
+ Value :: String ( s) => query:: Value :: String ( s) ,
368
368
Value :: Int ( i) => query:: Value :: Int ( query:: Number :: from ( i) ) ,
369
369
Value :: BigDecimal ( d) => query:: Value :: String ( d. to_string ( ) ) ,
370
370
Value :: Bool ( b) => query:: Value :: Boolean ( b) ,
@@ -558,8 +558,8 @@ impl DerefMut for Entity {
558
558
impl From < Entity > for BTreeMap < String , query:: Value > {
559
559
fn from ( entity : Entity ) -> BTreeMap < String , query:: Value > {
560
560
let mut fields = BTreeMap :: new ( ) ;
561
- for ( attr, value) in entity. iter ( ) {
562
- fields. insert ( attr. to_string ( ) , value. clone ( ) . into ( ) ) ;
561
+ for ( attr, value) in entity. 0 . into_iter ( ) {
562
+ fields. insert ( attr, value. into ( ) ) ;
563
563
}
564
564
fields
565
565
}
Original file line number Diff line number Diff line change @@ -202,11 +202,7 @@ where
202
202
derived_from_field. name . to_owned ( ) ,
203
203
) ) ;
204
204
} else {
205
- return Ok ( children
206
- . into_iter ( )
207
- . next ( )
208
- . map ( |value| value. clone ( ) )
209
- . unwrap_or ( q:: Value :: Null ) ) ;
205
+ return Ok ( children. into_iter ( ) . next ( ) . unwrap_or ( q:: Value :: Null ) ) ;
210
206
}
211
207
} else {
212
208
return Err ( QueryExecutionError :: ResolveEntitiesError ( format ! (
You can’t perform that action at this time.
0 commit comments