mirror of
https://github.com/CCExtractor/ccextractor.git
synced 2026-02-03 21:23:48 +00:00
[PR #1694] [MERGED] [FIX] Fixed Unit Test Rust based on the new changes on Rust 1.86.0 #2407
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/CCExtractor/ccextractor/pull/1694
Author: @steel-bucket
Created: 4/25/2025
Status: ✅ Merged
Merged: 5/18/2025
Merged by: @prateekmedia
Base:
master← Head:fix-unit-test📝 Commits (1)
1c6c22eFix Unit Test Rust based on the new changes on Rust 1.86.0📊 Changes
3 files changed (+24 additions, -8 deletions)
View changed files
📝
docs/CHANGES.TXT(+1 -0)📝
src/rust/src/decoder/mod.rs(+18 -7)📝
src/rust/src/lib.rs(+5 -1)📄 Description
In raising this pull request, I confirm the following (please check boxes):
My familiarity with the project is as follows (check one):
While working on the
sharemodule, I came across the problem that on the main branch, the Unit Test Rust(test_rust.yml) was failing. Reverting commits didn't help, later I found out that the problem was due to Rust being upgraded to 1.86.0.The New Changes to check for Null pointer De-referencing
This triggered a panic on 3 tests
test_do_cbinsrc/rust/src/lib.rstest_process_cc_datainsrc/rust/src/decoder.rstest_process_current_packetinsrc/rust/src/decoder.rsThe errors were fixed by checking for null pointers and reverting to a fallback value when true. I have used Box::leak in
decoder.rsfor now, it may be changed to a safer alternative later.How to replicate the errors for the main branch
git clone https://github.com/CCExtractor/ccextractor && cd ccextractorcd src/rustrustup updaterustup run 1.86.0 cargo test🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.