Skip to content

Commit 7156e1e

Browse files
authored
minor: update version and readme for release candidate (#192)
1 parent f7f785f commit 7156e1e

File tree

2 files changed

+16
-12
lines changed

2 files changed

+16
-12
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ repository = "https://github.com/mongodb/mongo-rust-driver"
88
license = "Apache-2.0"
99
readme = "README.md"
1010
name = "mongodb"
11-
version = "0.10.0"
11+
version = "0.11.0"
1212

1313
[features]
1414
default = ["tokio-runtime"]

README.md

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# MongoDB Rust Driver
22
[![Crates.io](https://img.shields.io/crates/v/mongodb.svg)](https://crates.io/crates/mongodb) [![docs.rs](https://docs.rs/mongodb/badge.svg)](https://docs.rs/mongodb) [![License](https://img.shields.io/badge/license-Apache%202.0-blue.svg)](LICENSE)
33

4-
This repository contains the officially supported MongoDB Rust driver, a client side library that can be used to interact with MongoDB deployments in Rust applications. It depends on the [`bson`](https://docs.rs/bson) crate for BSON support. The driver contains a fully async API that supports either [`tokio`](https://crates.io/crates/tokio) (default) or [`async-std`](https://crates.io/crates/async-std), depending on the feature flags set. The driver also has a sync API that may be enabled via feature flag.
4+
This repository contains the officially supported MongoDB Rust driver, a client side library that can be used to interact with MongoDB deployments in Rust applications. It uses the [`bson`](https://docs.rs/bson) crate for BSON support. The driver contains a fully async API that supports either [`tokio`](https://crates.io/crates/tokio) (default) or [`async-std`](https://crates.io/crates/async-std), depending on the feature flags set. The driver also has a sync API that may be enabled via feature flag.
55

66
## Index
77
- [Installation](#Installation)
@@ -26,16 +26,16 @@ This repository contains the officially supported MongoDB Rust driver, a client
2626
| Driver Version | Required Rust Version |
2727
|:--------------:|:---------------------:|
2828
| master | 1.43+ |
29+
| 0.11.x | 1.43+
2930
| 0.10.x | 1.43+ |
3031
| 0.9.x | 1.39+ |
3132
- MongoDB 3.6+
3233

3334
### Importing
34-
The driver is available on [crates.io](https://crates.io/crates/mongodb). To use the driver in your application, simply add it to your project's `Cargo.toml`. You will also want to add [`bson`](https://docs.rs/bson) as well.
35+
The driver is available on [crates.io](https://crates.io/crates/mongodb). To use the driver in your application, simply add it to your project's `Cargo.toml`.
3536
```toml
3637
[dependencies]
37-
mongodb = "0.10.0"
38-
bson = "0.14.1"
38+
mongodb = "0.11.0"
3939
```
4040

4141
#### Configuring the async runtime
@@ -44,7 +44,7 @@ The driver supports both of the most popular async runtime crates, namely [`toki
4444
For example, to instruct the driver to work with [`async-std`](https://crates.io/crates/async-std), add the following to your `Cargo.toml`:
4545
```toml
4646
[dependencies.mongodb]
47-
version = "0.10.0"
47+
version = "0.11.0"
4848
default-features = false
4949
features = ["async-std-runtime"]
5050
```
@@ -53,7 +53,7 @@ features = ["async-std-runtime"]
5353
The driver also provides a blocking sync API. To enable this, add the `"sync"` feature to your `Cargo.toml`:
5454
```toml
5555
[dependencies.mongodb]
56-
version = "0.10.0"
56+
version = "0.11.0"
5757
default-features = false
5858
features = ["sync"]
5959
```
@@ -94,7 +94,7 @@ for collection_name in db.list_collection_names(None).await? {
9494
```
9595
#### Inserting documents into a collection
9696
```rust
97-
use bson::doc;
97+
use mongodb::bson::doc;
9898
```
9999
```rust
100100
// Get a handle to a collection in the database.
@@ -111,9 +111,11 @@ collection.insert_many(docs, None).await?;
111111
```
112112
#### Finding documents in a collection
113113
```rust
114-
use bson::{doc, Bson};
115114
use futures::stream::StreamExt;
116-
use mongodb::options::FindOptions;
115+
use mongodb::{
116+
bson::{doc, Bson},
117+
options::FindOptions,
118+
};
117119
```
118120
```rust
119121
// Query the documents in the collection with a filter and an option.
@@ -141,8 +143,10 @@ The driver also provides a blocking sync API. See the [Installation](#enabling-t
141143

142144
The various sync-specific types are found in the `mongodb::sync` submodule rather than in the crate's top level like in the async API. The sync API calls through to the async API internally though, so it looks and behaves similarly to it.
143145
```rust
144-
use bson::{doc, Bson};
145-
use mongodb::sync::Client;
146+
use mongodb::{
147+
bson::{doc, Bson},
148+
sync::Client,
149+
};
146150
```
147151
```rust
148152
let client = Client::with_uri_str("mongodb://localhost:27017")?;

0 commit comments

Comments
 (0)