Skip to content

Commit ab93e30

Browse files
committed
updated to v0.4.1
1 parent 3268c8f commit ab93e30

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

Cargo.toml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "bson"
3-
version = "0.4.0"
3+
version = "0.4.1"
44
authors = [
55
"Y. T. Chung <[email protected]>",
66
"Kevin Yeh <[email protected]>"
@@ -9,6 +9,7 @@ description = "Encoding and decoding support for BSON in Rust"
99
license = "MIT"
1010
readme = "README.md"
1111
homepage = "https://github.com/zonyitoo/bson-rs"
12+
documentation = "https://docs.rs/crate/bson"
1213

1314
[lib]
1415
name = "bson"
@@ -23,4 +24,4 @@ rustc-serialize = "0.3"
2324
serde = "0.9"
2425
time = "0.1"
2526
linked-hash-map = "0.3"
26-
hostname = "^0.1"
27+
hostname = "^0.1"

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,14 @@ bson = "0.4"
2020
```
2121
## Usage
2222
Link the library in _main.rs_:
23+
2324
```rust
2425
#[macro_use(bson, doc)]
2526
extern crate bson;
2627
```
2728

2829
Prepare your struct for Serde serialization:
30+
2931
```rust
3032
#[derive(Serialize, Deserialize, Debug)]
3133
pub struct Person {
@@ -37,6 +39,7 @@ pub struct Person {
3739
```
3840

3941
Serialize the struct:
42+
4043
```rust
4144
use bson;
4245

@@ -56,6 +59,7 @@ if let bson::Bson::Document(document) = serialized_person {
5659
```
5760

5861
Deserialize the struct:
62+
5963
```rust
6064
// Read the document from a MongoDB collection
6165
let person_document = mongoCollection.find_one(Some(doc! { "_id" => "12345" }), None)?

0 commit comments

Comments
 (0)