Skip to content

Commit b74544e

Browse files
committed
docs: wrap synchronous API docs in feature blocks
1 parent f9b29e6 commit b74544e

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

postgresql_archive/src/lib.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,14 @@
3434
//!
3535
//! ### Synchronous API
3636
//! ```no_run
37+
//! #[cfg(feature = "blocking")] {
3738
//! use postgresql_archive::LATEST;
3839
//! use postgresql_archive::blocking::{extract, get_archive};
3940
//!
4041
//! let (archive_version, archive, hash) = get_archive(&LATEST).unwrap();
4142
//! let out_dir = std::env::temp_dir();
4243
//! let result = extract(&archive, &out_dir).unwrap();
44+
//! }
4345
//! ```
4446
//!
4547
//! ## Feature flags

postgresql_embedded/src/lib.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@
4242
//!
4343
//! ### Synchronous API
4444
//! ```no_run
45+
//! #[cfg(feature = "blocking")] {
4546
//! use postgresql_embedded::blocking::PostgreSQL;
4647
//!
4748
//! let mut postgresql = PostgreSQL::default();
@@ -54,6 +55,7 @@
5455
//! postgresql.drop_database(database_name).unwrap();
5556
//!
5657
//! postgresql.stop().unwrap();
58+
//! }
5759
//! ```
5860
//!
5961
//! ## Information

0 commit comments

Comments
 (0)