File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -192,11 +192,11 @@ macro_rules! py_namespace {
192
192
/// let obj = PyInt::new(0).into_ref(&vm).into_object();
193
193
/// assert_eq!(
194
194
/// "int",
195
- /// match_class!(obj.clone(),
195
+ /// match_class!(match obj.clone() {
196
196
/// PyInt => "int",
197
197
/// PyFloat => "float",
198
198
/// _ => "neither",
199
- /// )
199
+ /// } )
200
200
/// );
201
201
///
202
202
/// ```
@@ -216,11 +216,11 @@ macro_rules! py_namespace {
216
216
/// let vm: VirtualMachine = Default::default();
217
217
/// let obj = PyInt::new(0).into_ref(&vm).into_object();
218
218
///
219
- /// let int_value = match_class!(obj,
219
+ /// let int_value = match_class!(match obj {
220
220
/// i @ PyInt => i.as_bigint().clone(),
221
221
/// f @ PyFloat => f.to_f64().to_bigint().unwrap(),
222
222
/// obj => panic!("non-numeric object {}", obj),
223
- /// );
223
+ /// } );
224
224
///
225
225
/// assert!(int_value.is_zero());
226
226
/// ```
You can’t perform that action at this time.
0 commit comments