소스 검색

chore: reorganize miri

Jonathan Kelley 2 년 전
부모
커밋
1ad86890a4
1개의 변경된 파일4개의 추가작업 그리고 4개의 파일을 삭제
  1. 4 4
      packages/core/src/lazynodes.rs

+ 4 - 4
packages/core/src/lazynodes.rs

@@ -43,14 +43,14 @@ impl<'a, 'b> LazyNodes<'a, 'b> {
         let mut slot = Some(val);
         let mut slot = Some(val);
 
 
         Self {
         Self {
-            #[cfg(miri)]
-            inner: Box::new(move |f| {
+            #[cfg(not(miri))]
+            inner: smallbox!(move |f| {
                 let val = slot.take().expect("cannot call LazyNodes twice");
                 let val = slot.take().expect("cannot call LazyNodes twice");
                 val(f)
                 val(f)
             }),
             }),
 
 
-            #[cfg(not(miri))]
-            inner: smallbox!(move |f| {
+            #[cfg(miri)]
+            inner: Box::new(move |f| {
                 let val = slot.take().expect("cannot call LazyNodes twice");
                 let val = slot.take().expect("cannot call LazyNodes twice");
                 val(f)
                 val(f)
             }),
             }),