Skip to content

Commit 8419112

Browse files
committed
fix clippy warnings and mssql test err
1 parent f3aa52c commit 8419112

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

sqlx-core/src/odbc/connection/worker.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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 {

sqlx-core/src/odbc/types/bigdecimal.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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)

sqlx-core/src/odbc/types/json.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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
}

tests/any/any.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ async fn it_has_decimal() -> anyhow::Result<()> {
104104
async 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()) {

0 commit comments

Comments
 (0)