Skip to content

Commit 5999b59

Browse files
yannhamjneem
andauthored
Update cli/src/doctest.rs
Co-authored-by: jneem <[email protected]>
1 parent 8733488 commit 5999b59

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

cli/src/doctest.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -506,9 +506,8 @@ fn doctest_transform(
506506
let (record_data, includes, dyn_fields, _deps, _closurized) = lens.take();
507507
record_with_doctests(record_data, Some((includes, dyn_fields)), pos_idx)?
508508
}
509-
// unwrap(): we exclude the inline empty record case, which ensures that `into_opt` is `Some`
510-
ValueContent::Record(lens) if !lens.peek().is_inline_empty_record() => {
511-
record_with_doctests(lens.take().into_opt().unwrap(), None, pos_idx)?
509+
ValueContent::Record(lens) => {
510+
record_with_doctests(lens.take().unwrap_or_alloc(), None, pos_idx)?
512511
}
513512
lens => lens.restore(),
514513
};

0 commit comments

Comments
 (0)