Skip to content

Commit c619c70

Browse files
author
James O'Cull
committed
Documentation update and doc-test update
1 parent 854ea55 commit c619c70

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

README.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,20 @@ Currently only `Length` is available, but I am planning to add more shortly.
66

77
### Example
88

9+
In your Cargo.toml...
10+
11+
```
12+
[dependencies]
13+
measurements = "^0.1.0"
914
```
15+
16+
In your code...
17+
18+
```
19+
extern crate measurements;
20+
21+
use measurements::length::Length;
22+
1023
let football_field = Length::from_yards(1.0);
1124
let meters = football_field.as_meters();
1225
println!("There are {} meters in a football field.", meters);

src/lib.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ mod tests;
77
/// # Example
88
///
99
/// ```
10+
/// use measurements::length::Length;
11+
///
1012
/// let football_field = Length::from_yards(1.0);
1113
/// let meters = football_field.as_meters();
1214
/// println!("There are {} meters in a football field.", meters);

0 commit comments

Comments
 (0)