diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 079bb8b..a5ef794 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -63,3 +63,20 @@ jobs: - run: cargo build - run: cargo test + + miri: + runs-on: ubuntu-latest + strategy: + matrix: + rust: + - nightly + + steps: + - uses: actions/checkout@v4 + + - uses: dtolnay/rust-toolchain@master + with: + toolchain: ${{ matrix.rust }} + components: miri + + - run: cargo miri test diff --git a/src/raw.rs b/src/raw.rs index 1ddc4c6..fed0219 100644 --- a/src/raw.rs +++ b/src/raw.rs @@ -512,9 +512,9 @@ impl Connections { C: Into, { let child = child.into(); - let parent_r = unsafe { &mut *self.root }; - child.replace_parent(self.root); + + let parent_r = unsafe { &mut *self.root }; parent_r.children.push(child); }