File tree Expand file tree Collapse file tree 4 files changed +4
-4
lines changed Expand file tree Collapse file tree 4 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -675,7 +675,7 @@ fn extract_int(
675675
676676 let ( is_null, int) = match nullable. into_opt ( ) {
677677 None => ( true , None ) ,
678- Some ( v) => ( false , Some ( v. into ( ) ) ) ,
678+ Some ( v) => ( false , Some ( v) ) ,
679679 } ;
680680
681681 Ok ( crate :: odbc:: OdbcValue {
Original file line number Diff line number Diff line change @@ -43,7 +43,7 @@ impl<'r> Decode<'r, Odbc> for BigDecimal {
4343 return Ok ( BigDecimal :: from_f64 ( float) . ok_or ( format ! ( "bad float: {}" , float) ) ?) ;
4444 }
4545 if let Some ( text) = value. text {
46- return Ok ( BigDecimal :: from_str ( & text) . map_err ( |e| format ! ( "bad decimal text: {}" , e) ) ?) ;
46+ return Ok ( BigDecimal :: from_str ( text) . map_err ( |e| format ! ( "bad decimal text: {}" , e) ) ?) ;
4747 }
4848 if let Some ( bytes) = value. blob {
4949 return Ok ( BigDecimal :: parse_bytes ( bytes, 10 )
Original file line number Diff line number Diff line change @@ -44,7 +44,7 @@ impl<'r> Decode<'r, Odbc> for Value {
4444 } else if let Some ( f) = value. float {
4545 Ok ( serde_json:: Value :: from ( f) )
4646 } else {
47- Err ( serde_json:: Error :: custom ( "not a valid json type" ) . into ( ) )
47+ Err ( serde_json:: Error :: custom ( "not a valid json type" ) )
4848 }
4949 . map_err ( |e| format ! ( "ODBC: cannot decode JSON from {:?}: {}" , value, e) . into ( ) )
5050 }
Original file line number Diff line number Diff line change @@ -104,7 +104,7 @@ async fn it_has_decimal() -> anyhow::Result<()> {
104104async fn it_has_json ( ) -> anyhow:: Result < ( ) > {
105105 use serde_json:: json;
106106
107- let databases_without_json = [ "sqlite" , "mssql " , "snowflake" ] ;
107+ let databases_without_json = [ "sqlite" , "microsoft sql server " , "snowflake" ] ;
108108 let mut conn = crate :: new :: < sqlx_oldapi:: Any > ( ) . await ?;
109109 let dbms_name = conn. dbms_name ( ) . await . unwrap_or_default ( ) ;
110110 let json_sql = if databases_without_json. contains ( & dbms_name. to_lowercase ( ) . as_str ( ) ) {
You can’t perform that action at this time.
0 commit comments