Skip to content

Commit 481b3f5

Browse files
committed
Fix doc tests
1 parent a429b09 commit 481b3f5

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

vm/src/macros.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -192,11 +192,11 @@ macro_rules! py_namespace {
192192
/// let obj = PyInt::new(0).into_ref(&vm).into_object();
193193
/// assert_eq!(
194194
/// "int",
195-
/// match_class!(obj.clone(),
195+
/// match_class!(match obj.clone() {
196196
/// PyInt => "int",
197197
/// PyFloat => "float",
198198
/// _ => "neither",
199-
/// )
199+
/// })
200200
/// );
201201
///
202202
/// ```
@@ -216,11 +216,11 @@ macro_rules! py_namespace {
216216
/// let vm: VirtualMachine = Default::default();
217217
/// let obj = PyInt::new(0).into_ref(&vm).into_object();
218218
///
219-
/// let int_value = match_class!(obj,
219+
/// let int_value = match_class!(match obj {
220220
/// i @ PyInt => i.as_bigint().clone(),
221221
/// f @ PyFloat => f.to_f64().to_bigint().unwrap(),
222222
/// obj => panic!("non-numeric object {}", obj),
223-
/// );
223+
/// });
224224
///
225225
/// assert!(int_value.is_zero());
226226
/// ```

0 commit comments

Comments
 (0)