Skip to content

Commit 292f082

Browse files
committed
fix warnings
1 parent df1e72b commit 292f082

File tree

4 files changed

+12
-18
lines changed

4 files changed

+12
-18
lines changed

.github/workflows/sqlx-cli.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,13 @@ jobs:
2222
2323
- uses: Swatinem/rust-cache@v2
2424

25-
- run: cargo clippy --manifest_path sqlx-cli/Cargo.toml -- -D warnings
25+
- run: cargo clippy --manifest-path sqlx-cli/Cargo.toml -- -D warnings
2626

2727
# Run beta for new warnings but don't break the build.
2828
# Use a subdirectory of `target` to avoid clobbering the cache.
2929
- run: >
3030
cargo +beta clippy
31-
--manifest_path sqlx-cli/Cargo.toml
31+
--manifest-path sqlx-cli/Cargo.toml
3232
--target-dir target/beta/
3333
3434
test:

sqlx-core/src/any/mod.rs

+1
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ pub use connection::AnyConnection;
3333
use crate::encode::Encode;
3434
pub use connection::AnyConnectionBackend;
3535
pub use database::Any;
36+
#[allow(deprecated)]
3637
pub use kind::AnyKind;
3738
pub use options::AnyConnectOptions;
3839
pub use query_result::AnyQueryResult;

sqlx-core/src/pool/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -470,7 +470,7 @@ impl<DB: Database> Pool<DB> {
470470
/// // This is because `.do_until()` cancels the future it's given if the
471471
/// // pool is closed first.
472472
/// println!("Waited!");
473-
///
473+
///
474474
/// Ok(())
475475
/// }).await
476476
/// });

tests/postgres/query_builder.rs

+8-15
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
use sqlx::Execute;
21
use sqlx::postgres::Postgres;
32
use sqlx::query_builder::QueryBuilder;
3+
use sqlx::Execute;
44

55
#[test]
66
fn test_new() {
@@ -15,25 +15,24 @@ fn test_push() {
1515
qb.push(second_line);
1616

1717
assert_eq!(
18-
qb.sql(),
19-
"SELECT * FROM users WHERE last_name LIKE '[A-N]%';".to_string(),
20-
);
18+
qb.sql(),
19+
"SELECT * FROM users WHERE last_name LIKE '[A-N]%';".to_string(),
20+
);
2121
}
2222

2323
#[test]
2424
#[should_panic]
2525
fn test_push_panics_after_build_without_reset() {
2626
let mut qb: QueryBuilder<'_, Postgres> = QueryBuilder::new("SELECT * FROM users;");
27-
27+
2828
let _query = qb.build();
2929

3030
qb.push("SELECT * FROM users;");
3131
}
3232

3333
#[test]
3434
fn test_push_bind() {
35-
let mut qb: QueryBuilder<'_, Postgres> =
36-
QueryBuilder::new("SELECT * FROM users WHERE id = ");
35+
let mut qb: QueryBuilder<'_, Postgres> = QueryBuilder::new("SELECT * FROM users WHERE id = ");
3736

3837
qb.push_bind(42i32)
3938
.push(" OR membership_level = ")
@@ -52,10 +51,7 @@ fn test_build() {
5251
qb.push(" WHERE id = ").push_bind(42i32);
5352
let query = qb.build();
5453

55-
assert_eq!(
56-
query.sql(),
57-
"SELECT * FROM users WHERE id = $1"
58-
);
54+
assert_eq!(query.sql(), "SELECT * FROM users WHERE id = $1");
5955
assert_eq!(Execute::persistent(&query), true);
6056
}
6157

@@ -86,10 +82,7 @@ fn test_query_builder_reuse() {
8682

8783
let query = qb.push("SELECT * FROM users WHERE id = 99").build();
8884

89-
assert_eq!(
90-
query.sql(),
91-
"SELECT * FROM users WHERE id = 99"
92-
);
85+
assert_eq!(query.sql(), "SELECT * FROM users WHERE id = 99");
9386
}
9487

9588
#[test]

0 commit comments

Comments
 (0)