Skip to content

Commit 697d1aa

Browse files
author
James O'Cull
committed
Changes to make doc tests compile.
1 parent 4606e32 commit 697d1aa

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/lib.rs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,10 @@
33
///
44
/// # Example
55
/// ```
6+
/// // Importing the `implement_measurement` macro from the external crate is important
67
/// #[macro_use]
8+
/// extern crate measurements;
9+
///
710
/// use measurements::measurement::*;
811
///
912
/// struct Cubits {
@@ -21,7 +24,11 @@
2124
/// }
2225
///
2326
/// // Invoke the macro to automatically implement Add, Sub, etc...
24-
/// // implement_measurement! { Cubits } // TODO: Fix doc tests to make this work...
27+
/// implement_measurement! { Cubits }
28+
///
29+
/// // The main function here is only included to make doc tests compile.
30+
/// // You should't need it in your own code.
31+
/// fn main() { }
2532
/// ```
2633
#[macro_use]
2734
pub mod measurement;

0 commit comments

Comments
 (0)