mirror of
https://github.com/gentoo-mirror/guru.git
synced 2026-07-18 11:33:15 -04:00
dev-tex/tectonic: fix the "implicit autoref" error
Signed-off-by: Pavel Sobolev <contact@paveloom.dev>
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
From: Pavel Sobolev <contact@paveloom.dev>
|
||||
Subject: [PATCH] Fix the "implicit autoref" error.
|
||||
|
||||
Fixes the "implicit autoref creates a reference to the dereference of a raw
|
||||
pointer" error.
|
||||
|
||||
Signed-off-by: Pavel Sobolev <contact@paveloom.dev>
|
||||
|
||||
--- a/crates/engine_bibtex/src/xbuf.rs
|
||||
+++ b/crates/engine_bibtex/src/xbuf.rs
|
||||
@@ -52,7 +52,7 @@ pub unsafe fn xrealloc_zeroed<T: SafelyZero>(
|
||||
old: *mut [T],
|
||||
new_len: usize,
|
||||
) -> Option<&'static mut [T]> {
|
||||
- let old_len = (*old).len();
|
||||
+ let old_len = old.len();
|
||||
let new_size = new_len * mem::size_of::<T>();
|
||||
// SAFETY: realloc can be called with any size, even 0, that will just deallocate and return null
|
||||
let ptr = unsafe { xrealloc(old.cast(), new_size) }.cast::<T>();
|
||||
Reference in New Issue
Block a user