Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix lifetime warning in Rust 1.70 (#352)
* Fix lifetime warning in Rust 1.70 Starting with rustc 1.70.0, the code in raw.rs:hash_get_multi produced the following warnings: this `CString` is deallocated at the end of the statement, bind it to a variable to extend its lifetime While it would work in practice due to the underlying implementation just doing pointer juggling, this warning was correct: The CString created within the macro `f` would be destroyed before the reference to the pointer taken from it with `as_ptr` was used. Resolved by binding the lifetime of the CStrings to that of the iterator variable, which is alive until the function returns. * Proper fix this time (hopefully)
- Loading branch information