@@ -39,7 +39,6 @@ struct Node<K, V> {
39
39
/// ```
40
40
/// use kernel::rbtree::RBTree;
41
41
///
42
- /// # fn test() -> Result {
43
42
/// // Create a new tree.
44
43
/// let mut tree = RBTree::new();
45
44
///
@@ -110,10 +109,7 @@ struct Node<K, V> {
110
109
/// assert!(iter.next().is_none());
111
110
/// }
112
111
///
113
- /// # Ok(())
114
- /// # }
115
- /// #
116
- /// # assert_eq!(test(), Ok(()));
112
+ /// # Ok::<(), Error>(())
117
113
/// ```
118
114
///
119
115
/// In the example below, we first allocate a node, acquire a spinlock, then insert the node into
@@ -140,7 +136,6 @@ struct Node<K, V> {
140
136
/// ```
141
137
/// use kernel::rbtree::RBTree;
142
138
///
143
- /// # fn test() -> Result {
144
139
/// // Create a new tree.
145
140
/// let mut tree = RBTree::new();
146
141
///
@@ -185,10 +180,7 @@ struct Node<K, V> {
185
180
/// assert!(iter.next().is_none());
186
181
/// }
187
182
///
188
- /// # Ok(())
189
- /// # }
190
- /// #
191
- /// # assert_eq!(test(), Ok(()));
183
+ /// # Ok::<(), Error>(())
192
184
/// ```
193
185
pub struct RBTree < K , V > {
194
186
root : bindings:: rb_root ,
0 commit comments