Skip to content

Commit dc08511

Browse files
minor: revert changes to documentation example comments (#586)
1 parent bf12ff8 commit dc08511

File tree

1 file changed

+16
-16
lines changed
  • src/test/documentation_examples

1 file changed

+16
-16
lines changed

src/test/documentation_examples/mod.rs

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1392,42 +1392,42 @@ async fn stable_api_examples() -> GenericResult<()> {
13921392
}
13931393

13941394
let uri = DEFAULT_URI.clone();
1395-
// Start Stable API Example 1
1395+
// Start Versioned API Example 1
13961396
let mut options = ClientOptions::parse(&uri).await?;
13971397
let server_api = ServerApi::builder().version(ServerApiVersion::V1).build();
13981398
options.server_api = Some(server_api);
13991399
let client = Client::with_options(options)?;
1400-
// End Stable API Example 1
1400+
// End Versioned API Example 1
14011401

1402-
// Start Stable API Example 2
1402+
// Start Versioned API Example 2
14031403
let mut options = ClientOptions::parse(&uri).await?;
14041404
let server_api = ServerApi::builder()
14051405
.version(ServerApiVersion::V1)
14061406
.strict(true)
14071407
.build();
14081408
options.server_api = Some(server_api);
14091409
let client = Client::with_options(options)?;
1410-
// End Stable API Example 2
1410+
// End Versioned API Example 2
14111411

1412-
// Start Stable API Example 3
1412+
// Start Versioned API Example 3
14131413
let mut options = ClientOptions::parse(&uri).await?;
14141414
let server_api = ServerApi::builder()
14151415
.version(ServerApiVersion::V1)
14161416
.strict(false)
14171417
.build();
14181418
options.server_api = Some(server_api);
14191419
let client = Client::with_options(options)?;
1420-
// End Stable API Example 3
1420+
// End Versioned API Example 3
14211421

1422-
// Start Stable API Example 4
1422+
// Start Versioned API Example 4
14231423
let mut options = ClientOptions::parse(&uri).await?;
14241424
let server_api = ServerApi::builder()
14251425
.version(ServerApiVersion::V1)
14261426
.deprecation_errors(true)
14271427
.build();
14281428
options.server_api = Some(server_api);
14291429
let client = Client::with_options(options)?;
1430-
// End Stable API Example 4
1430+
// End Versioned API Example 4
14311431

14321432
let mut options = ClientOptions::parse(&uri).await?;
14331433
let server_api = ServerApi::builder()
@@ -1441,7 +1441,7 @@ async fn stable_api_examples() -> GenericResult<()> {
14411441

14421442
use std::{error::Error, result::Result};
14431443

1444-
// Start Stable API Example 5
1444+
// Start Versioned API Example 5
14451445
// With the `bson-chrono-0_4` feature enabled, this function can be dropped in favor of using
14461446
// `chrono::DateTime` values directly.
14471447
fn iso_date(text: &str) -> Result<bson::DateTime, Box<dyn Error>> {
@@ -1458,9 +1458,9 @@ async fn stable_api_examples() -> GenericResult<()> {
14581458
doc! { "_id" : 7, "item" : "xyz", "price" : 5, "quantity" : 10, "date" : iso_date("2021-02-15T14:12:12Z")? },
14591459
doc! { "_id" : 8, "item" : "abc", "price" : 10, "quantity" : 5, "date" : iso_date("2021-03-16T20:20:13Z")? }
14601460
], None).await?;
1461-
// End Stable API Example 5
1461+
// End Versioned API Example 5
14621462

1463-
// Start Stable API Example 6
1463+
// Start Versioned API Example 6
14641464
let result = db
14651465
.run_command(
14661466
doc! {
@@ -1480,24 +1480,24 @@ async fn stable_api_examples() -> GenericResult<()> {
14801480
// },
14811481
// )
14821482
}
1483-
// End Stable API Example 6
1483+
// End Versioned API Example 6
14841484
if let ErrorKind::Command(ref err) = *result.as_ref().unwrap_err().kind {
14851485
assert_eq!(err.code, 323);
14861486
assert_eq!(err.code_name, "APIStrictError".to_string());
14871487
} else {
14881488
panic!("invalid result {:?}", result);
14891489
};
14901490

1491-
// Start Stable API Example 7
1491+
// Start Versioned API Example 7
14921492
let count = db
14931493
.collection::<Document>("sales")
14941494
.count_documents(None, None)
14951495
.await?;
1496-
// End Stable API Example 7
1496+
// End Versioned API Example 7
14971497

1498-
// Start Stable API Example 8
1498+
// Start Versioned API Example 8
14991499
assert_eq!(count, 8);
1500-
// End Stable API Example 8
1500+
// End Versioned API Example 8
15011501

15021502
Ok(())
15031503
}

0 commit comments

Comments
 (0)