Skip to content

Commit b5eb9be

Browse files
committed
build: address pedantic clippy warnings
1 parent 0d0433f commit b5eb9be

36 files changed

+73
-69
lines changed

postgresql_archive/src/version.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@ mod tests {
268268

269269
#[test]
270270
fn test_version_deserialize_parse_error() {
271-
assert!(serde_json::from_str::<Version>("\"foo\"").is_err())
271+
assert!(serde_json::from_str::<Version>("\"foo\"").is_err());
272272
}
273273

274274
//

postgresql_commands/src/clusterdb.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ use std::convert::AsRef;
44
use std::ffi::{OsStr, OsString};
55
use std::path::PathBuf;
66

7-
/// clusterdb clusters all previously clustered tables in a database.
7+
/// `clusterdb` clusters all previously clustered tables in a database.
88
#[derive(Clone, Debug, Default)]
99
pub struct ClusterDbBuilder {
1010
program_dir: Option<PathBuf>,
@@ -252,7 +252,7 @@ mod tests {
252252
assert_eq!(
253253
r#"PGPASSWORD="password" "./clusterdb" "--host" "localhost" "--port" "5432" "--username" "postgres""#,
254254
command.to_command_string()
255-
)
255+
);
256256
}
257257

258258
#[test]

postgresql_commands/src/createdb.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ use std::convert::AsRef;
44
use std::ffi::{OsStr, OsString};
55
use std::path::PathBuf;
66

7-
/// createdb creates a PostgreSQL database.
7+
/// `createdb` creates a PostgreSQL database.
88
#[derive(Clone, Debug, Default)]
99
pub struct CreateDbBuilder {
1010
program_dir: Option<PathBuf>,
@@ -349,7 +349,7 @@ mod tests {
349349
assert_eq!(
350350
r#"PGPASSWORD="password" "./createdb" "--host" "localhost" "--port" "5432" "--username" "postgres""#,
351351
command.to_command_string()
352-
)
352+
);
353353
}
354354

355355
#[test]

postgresql_commands/src/createuser.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ use std::convert::AsRef;
44
use std::ffi::{OsStr, OsString};
55
use std::path::PathBuf;
66

7-
/// createuser creates a new PostgreSQL role.
7+
/// `createuser` creates a new PostgreSQL role.
88
#[derive(Clone, Debug, Default)]
99
pub struct CreateUserBuilder {
1010
program_dir: Option<PathBuf>,
@@ -419,7 +419,7 @@ mod tests {
419419
assert_eq!(
420420
r#"PGPASSWORD="password" "./createuser" "--host" "localhost" "--port" "5432" "--username" "postgres""#,
421421
command.to_command_string()
422-
)
422+
);
423423
}
424424

425425
#[test]

postgresql_commands/src/dropdb.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ use crate::Settings;
33
use std::ffi::{OsStr, OsString};
44
use std::path::PathBuf;
55

6-
/// dropdb removes a PostgreSQL database.
6+
/// `dropdb` removes a PostgreSQL database.
77
#[derive(Clone, Debug, Default)]
88
pub struct DropDbBuilder {
99
program_dir: Option<PathBuf>,
@@ -238,7 +238,7 @@ mod tests {
238238
assert_eq!(
239239
r#"PGPASSWORD="password" "./dropdb" "--host" "localhost" "--port" "5432" "--username" "postgres""#,
240240
command.to_command_string()
241-
)
241+
);
242242
}
243243

244244
#[test]

postgresql_commands/src/dropuser.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ use std::convert::AsRef;
44
use std::ffi::{OsStr, OsString};
55
use std::path::PathBuf;
66

7-
/// dropuser removes a PostgreSQL role.
7+
/// `dropuser` removes a PostgreSQL role.
88
#[derive(Clone, Debug, Default)]
99
pub struct DropUserBuilder {
1010
program_dir: Option<PathBuf>,
@@ -205,7 +205,7 @@ mod tests {
205205
assert_eq!(
206206
r#"PGPASSWORD="password" "./dropuser" "--host" "localhost" "--port" "5432" "--username" "postgres""#,
207207
command.to_command_string()
208-
)
208+
);
209209
}
210210

211211
#[test]

postgresql_commands/src/ecpg.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ use std::convert::AsRef;
44
use std::ffi::{OsStr, OsString};
55
use std::path::PathBuf;
66

7-
/// ecpg is the PostgreSQL embedded SQL preprocessor for C programs.
7+
/// `ecpg` is the PostgreSQL embedded SQL preprocessor for C programs.
88
#[derive(Clone, Debug, Default)]
99
pub struct EcpgBuilder {
1010
program_dir: Option<PathBuf>,
@@ -203,8 +203,9 @@ mod tests {
203203
#[test]
204204
fn test_builder_from() {
205205
let command = EcpgBuilder::from(&TestSettings).build();
206-
assert_eq!(r#""./ecpg""#, command.to_command_string())
206+
assert_eq!(r#""./ecpg""#, command.to_command_string());
207207
}
208+
208209
#[test]
209210
fn test_builder() {
210211
let command = EcpgBuilder::new()

postgresql_commands/src/initdb.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ use std::convert::AsRef;
44
use std::ffi::{OsStr, OsString};
55
use std::path::PathBuf;
66

7-
/// initdb initializes a PostgreSQL database cluster.
7+
/// `initdb` initializes a PostgreSQL database cluster.
88
#[derive(Clone, Debug, Default)]
99
pub struct InitDbBuilder {
1010
program_dir: Option<PathBuf>,
@@ -478,7 +478,7 @@ mod tests {
478478
assert_eq!(
479479
r#""./initdb" "--username" "postgres""#,
480480
command.to_command_string()
481-
)
481+
);
482482
}
483483

484484
#[test]

postgresql_commands/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
#![allow(async_fn_in_trait)]
21
#![forbid(unsafe_code)]
2+
#![allow(async_fn_in_trait)]
33

44
//! Command builders for interacting with PostgreSQL via CLI.
55
//!

postgresql_commands/src/oid2name.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ use std::convert::AsRef;
44
use std::ffi::{OsStr, OsString};
55
use std::path::PathBuf;
66

7-
/// oid2name helps to examine the file structure used by PostgreSQL.
7+
/// `oid2name` helps to examine the file structure used by PostgreSQL.
88
#[derive(Clone, Debug, Default)]
99
pub struct Oid2NameBuilder {
1010
program_dir: Option<PathBuf>,
@@ -234,7 +234,7 @@ mod tests {
234234
assert_eq!(
235235
r#""./oid2name" "--host" "localhost" "--port" "5432" "--username" "postgres""#,
236236
command.to_command_string()
237-
)
237+
);
238238
}
239239

240240
#[test]

0 commit comments

Comments
 (0)