From 4bf0d053bb0a353bebee05d1abaeebab798089e8 Mon Sep 17 00:00:00 2001 From: Marvin Hansen Date: Thu, 21 Nov 2024 13:55:45 +0800 Subject: [PATCH] Fixed CI workflow Signed-off-by: Marvin Hansen --- .github/workflows/run_tests.yml | 6 +++--- .../src/window_type/storage_unsafe/unsafe_storage_vec.rs | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/run_tests.yml b/.github/workflows/run_tests.yml index 30d2db9d..d1ea30a9 100644 --- a/.github/workflows/run_tests.yml +++ b/.github/workflows/run_tests.yml @@ -15,10 +15,10 @@ jobs: steps: - uses: actions/checkout@v4 - name: Build - run: cargo build --feature unsafe --verbose + run: cargo build --features unsafe --verbose - name: Run Doc tests - run: cargo test --feature unsafe --doc --verbose + run: cargo test --features unsafe --doc --verbose - name: Run tests - run: cargo test --feature unsafe --verbose \ No newline at end of file + run: cargo test --features unsafe --verbose \ No newline at end of file diff --git a/dcl_data_structures/src/window_type/storage_unsafe/unsafe_storage_vec.rs b/dcl_data_structures/src/window_type/storage_unsafe/unsafe_storage_vec.rs index 2f7a3af4..50a3c0dd 100644 --- a/dcl_data_structures/src/window_type/storage_unsafe/unsafe_storage_vec.rs +++ b/dcl_data_structures/src/window_type/storage_unsafe/unsafe_storage_vec.rs @@ -50,6 +50,7 @@ where pub fn new(size: usize, multiple: usize) -> Self { let capacity = size * multiple; let vec = vec![T::default(); capacity]; + assert!(!vec.as_ptr().is_null(), "Vector allocation failed"); Self { vec, size,