Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit b5eb9be

Browse filesBrowse files
committed
build: address pedantic clippy warnings
1 parent 0d0433f commit b5eb9be
Copy full SHA for b5eb9be
Expand file treeCollapse file tree

36 files changed

+73
-69
lines changed

‎postgresql_archive/src/version.rs

Copy file name to clipboardExpand all lines: postgresql_archive/src/version.rs
+1-1Lines 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

Copy file name to clipboardExpand all lines: postgresql_commands/src/clusterdb.rs
+2-2Lines 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

Copy file name to clipboardExpand all lines: postgresql_commands/src/createdb.rs
+2-2Lines 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

Copy file name to clipboardExpand all lines: postgresql_commands/src/createuser.rs
+2-2Lines 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

Copy file name to clipboardExpand all lines: postgresql_commands/src/dropdb.rs
+2-2Lines 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

Copy file name to clipboardExpand all lines: postgresql_commands/src/dropuser.rs
+2-2Lines 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

Copy file name to clipboardExpand all lines: postgresql_commands/src/ecpg.rs
+3-2Lines 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

Copy file name to clipboardExpand all lines: postgresql_commands/src/initdb.rs
+2-2Lines 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

Copy file name to clipboardExpand all lines: postgresql_commands/src/lib.rs
+1-1Lines 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

Copy file name to clipboardExpand all lines: postgresql_commands/src/oid2name.rs
+2-2Lines 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]

‎postgresql_commands/src/pg_amcheck.rs

Copy file name to clipboardExpand all lines: postgresql_commands/src/pg_amcheck.rs
+3-2Lines 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-
/// pg_amcheck checks objects in a PostgreSQL database for corruption.
7+
/// `pg_amcheck` checks objects in a PostgreSQL database for corruption.
88
#[derive(Clone, Debug, Default)]
99
pub struct PgAmCheckBuilder {
1010
program_dir: Option<PathBuf>,
@@ -495,8 +495,9 @@ mod tests {
495495
assert_eq!(
496496
r#"PGPASSWORD="password" "./pg_amcheck" "--host" "localhost" "--port" "5432" "--username" "postgres""#,
497497
command.to_command_string()
498-
)
498+
);
499499
}
500+
500501
#[test]
501502
fn test_builder() {
502503
let command = PgAmCheckBuilder::new()

‎postgresql_commands/src/pg_archivecleanup.rs

Copy file name to clipboardExpand all lines: postgresql_commands/src/pg_archivecleanup.rs
+2-2Lines 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-
/// pg_archivecleanup removes older WAL files from PostgreSQL archives.
7+
/// `pg_archivecleanup` removes older WAL files from PostgreSQL archives.
88
#[derive(Clone, Debug, Default)]
99
pub struct PgArchiveCleanupBuilder {
1010
program_dir: Option<PathBuf>,
@@ -144,7 +144,7 @@ mod tests {
144144
#[test]
145145
fn test_builder_from() {
146146
let command = PgArchiveCleanupBuilder::from(&TestSettings).build();
147-
assert_eq!(r#""./pg_archivecleanup""#, command.to_command_string())
147+
assert_eq!(r#""./pg_archivecleanup""#, command.to_command_string());
148148
}
149149

150150
#[test]

‎postgresql_commands/src/pg_basebackup.rs

Copy file name to clipboardExpand all lines: postgresql_commands/src/pg_basebackup.rs
+2-2Lines 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-
/// pg_basebackup takes a base backup of a running PostgreSQL server.
7+
/// `pg_basebackup` takes a base backup of a running PostgreSQL server.
88
#[derive(Clone, Debug, Default)]
99
pub struct PgBaseBackupBuilder {
1010
program_dir: Option<PathBuf>,
@@ -472,7 +472,7 @@ mod tests {
472472
assert_eq!(
473473
r#"PGPASSWORD="password" "./pg_basebackup" "--host" "localhost" "--port" "5432" "--username" "postgres""#,
474474
command.to_command_string()
475-
)
475+
);
476476
}
477477

478478
#[test]

‎postgresql_commands/src/pg_checksums.rs

Copy file name to clipboardExpand all lines: postgresql_commands/src/pg_checksums.rs
+2-2Lines 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-
/// pg_checksums enables, disables, or verifies data checksums in a PostgreSQL database cluster.
7+
/// `pg_checksums` enables, disables, or verifies data checksums in a PostgreSQL database cluster.
88
#[derive(Clone, Debug, Default)]
99
pub struct PgChecksumsBuilder {
1010
program_dir: Option<PathBuf>,
@@ -178,7 +178,7 @@ mod tests {
178178
#[test]
179179
fn test_builder_from() {
180180
let command = PgChecksumsBuilder::from(&TestSettings).build();
181-
assert_eq!(r#""./pg_checksums""#, command.to_command_string())
181+
assert_eq!(r#""./pg_checksums""#, command.to_command_string());
182182
}
183183

184184
#[test]

‎postgresql_commands/src/pg_config.rs

Copy file name to clipboardExpand all lines: postgresql_commands/src/pg_config.rs
+2-2Lines 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-
/// pg_config provides information about the installed version of PostgreSQL.
7+
/// `pg_config` provides information about the installed version of PostgreSQL.
88
#[derive(Clone, Debug, Default)]
99
pub struct PgConfigBuilder {
1010
program_dir: Option<PathBuf>,
@@ -343,7 +343,7 @@ mod tests {
343343
#[test]
344344
fn test_builder_from() {
345345
let command = PgConfigBuilder::from(&TestSettings).build();
346-
assert_eq!(r#""./pg_config""#, command.to_command_string())
346+
assert_eq!(r#""./pg_config""#, command.to_command_string());
347347
}
348348

349349
#[test]

‎postgresql_commands/src/pg_controldata.rs

Copy file name to clipboardExpand all lines: postgresql_commands/src/pg_controldata.rs
+3-2Lines changed: 3 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-
/// pg_controldata displays control information of a PostgreSQL database cluster.
6+
/// `pg_controldata` displays control information of a PostgreSQL database cluster.
77
#[derive(Clone, Debug, Default)]
88
pub struct PgControlDataBuilder {
99
program_dir: Option<PathBuf>,
@@ -99,8 +99,9 @@ mod tests {
9999
#[test]
100100
fn test_builder_from() {
101101
let command = PgControlDataBuilder::from(&TestSettings).build();
102-
assert_eq!(r#""./pg_controldata""#, command.to_command_string())
102+
assert_eq!(r#""./pg_controldata""#, command.to_command_string());
103103
}
104+
104105
#[test]
105106
fn test_builder() {
106107
let command = PgControlDataBuilder::new()

‎postgresql_commands/src/pg_ctl.rs

Copy file name to clipboardExpand all lines: postgresql_commands/src/pg_ctl.rs
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ use std::ffi::{OsStr, OsString};
55
use std::fmt::Display;
66
use std::path::PathBuf;
77

8-
/// pg_ctl is a utility to initialize, start, stop, or control a PostgreSQL server.
8+
/// `pg_ctl` is a utility to initialize, start, stop, or control a PostgreSQL server.
99
#[derive(Clone, Debug, Default)]
1010
pub struct PgCtlBuilder {
1111
program_dir: Option<PathBuf>,
@@ -303,7 +303,7 @@ mod tests {
303303
#[test]
304304
fn test_builder_from() {
305305
let command = PgCtlBuilder::from(&TestSettings).build();
306-
assert_eq!(r#""./pg_ctl""#, command.to_command_string())
306+
assert_eq!(r#""./pg_ctl""#, command.to_command_string());
307307
}
308308

309309
#[test]

‎postgresql_commands/src/pg_dump.rs

Copy file name to clipboardExpand all lines: postgresql_commands/src/pg_dump.rs
+2-2Lines 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-
/// pg_dump dumps a database as a text file or to other formats.
7+
/// `pg_dump` dumps a database as a text file or to other formats.
88
#[derive(Clone, Debug, Default)]
99
pub struct PgDumpBuilder {
1010
program_dir: Option<PathBuf>,
@@ -780,7 +780,7 @@ mod tests {
780780
assert_eq!(
781781
r#"PGPASSWORD="password" "./pg_dump" "--host" "localhost" "--port" "5432" "--username" "postgres""#,
782782
command.to_command_string()
783-
)
783+
);
784784
}
785785

786786
#[test]

‎postgresql_commands/src/pg_dumpall.rs

Copy file name to clipboardExpand all lines: postgresql_commands/src/pg_dumpall.rs
+2-2Lines 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-
/// pg_dumpall extracts a PostgreSQL database cluster into an SQL script file.
7+
/// `pg_dumpall` extracts a PostgreSQL database cluster into an SQL script file.
88
#[derive(Clone, Debug, Default)]
99
pub struct PgDumpAllBuilder {
1010
program_dir: Option<PathBuf>,
@@ -611,7 +611,7 @@ mod tests {
611611
assert_eq!(
612612
r#"PGPASSWORD="password" "./pg_dumpall" "--host" "localhost" "--port" "5432" "--username" "postgres""#,
613613
command.to_command_string()
614-
)
614+
);
615615
}
616616

617617
#[test]

‎postgresql_commands/src/pg_isready.rs

Copy file name to clipboardExpand all lines: postgresql_commands/src/pg_isready.rs
+2-2Lines 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-
/// pg_isready issues a connection check to a PostgreSQL database.
7+
/// `pg_isready` issues a connection check to a PostgreSQL database.
88
#[derive(Clone, Debug, Default)]
99
pub struct PgIsReadyBuilder {
1010
program_dir: Option<PathBuf>,
@@ -166,7 +166,7 @@ mod tests {
166166
assert_eq!(
167167
r#""./pg_isready" "--host" "localhost" "--port" "5432" "--username" "postgres""#,
168168
command.to_command_string()
169-
)
169+
);
170170
}
171171

172172
#[test]

‎postgresql_commands/src/pg_receivewal.rs

Copy file name to clipboardExpand all lines: postgresql_commands/src/pg_receivewal.rs
+2-2Lines 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-
/// pg_receivewal receives PostgreSQL streaming write-ahead logs.
7+
/// `pg_receivewal` receives PostgreSQL streaming write-ahead logs.
88
#[derive(Clone, Debug, Default)]
99
pub struct PgReceiveWalBuilder {
1010
program_dir: Option<PathBuf>,
@@ -321,7 +321,7 @@ mod tests {
321321
assert_eq!(
322322
r#"PGPASSWORD="password" "./pg_receivewal" "--host" "localhost" "--port" "5432" "--username" "postgres""#,
323323
command.to_command_string()
324-
)
324+
);
325325
}
326326

327327
#[test]

‎postgresql_commands/src/pg_recvlogical.rs

Copy file name to clipboardExpand all lines: postgresql_commands/src/pg_recvlogical.rs
+2-2Lines 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-
/// pg_recvlogical controls PostgreSQL logical decoding streams.
7+
/// `pg_recvlogical` controls PostgreSQL logical decoding streams.
88
#[derive(Clone, Debug, Default)]
99
pub struct PgRecvLogicalBuilder {
1010
program_dir: Option<PathBuf>,
@@ -357,7 +357,7 @@ mod tests {
357357
assert_eq!(
358358
r#"PGPASSWORD="password" "./pg_recvlogical" "--host" "localhost" "--port" "5432" "--username" "postgres""#,
359359
command.to_command_string()
360-
)
360+
);
361361
}
362362

363363
#[test]

‎postgresql_commands/src/pg_resetwal.rs

Copy file name to clipboardExpand all lines: postgresql_commands/src/pg_resetwal.rs
+2-2Lines 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-
/// pg_resetwal resets the PostgreSQL write-ahead log.
7+
/// `pg_resetwal` resets the PostgreSQL write-ahead log.
88
#[derive(Clone, Debug, Default)]
99
pub struct PgResetWalBuilder {
1010
program_dir: Option<PathBuf>,
@@ -230,7 +230,7 @@ mod tests {
230230
#[test]
231231
fn test_builder_from() {
232232
let command = PgResetWalBuilder::from(&TestSettings).build();
233-
assert_eq!(r#""./pg_resetwal""#, command.to_command_string())
233+
assert_eq!(r#""./pg_resetwal""#, command.to_command_string());
234234
}
235235

236236
#[test]

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.