Skip to content

Commit c271be6

Browse files
committed
Alternative for use of unstable library feature 'ptr_from_ref'
1 parent 48cc14a commit c271be6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llama-cpp-2/src/token/data_array.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -359,7 +359,7 @@ impl LlamaTokenDataArray {
359359
eta: f32,
360360
mu: &mut f32,
361361
) -> LlamaToken {
362-
let mu_ptr = ptr::from_mut(mu);
362+
let mu_ptr = mu as *mut f32;
363363
let token = unsafe {
364364
self.modify_as_c_llama_token_data_array(|c_llama_token_data_array| {
365365
llama_cpp_sys_2::llama_sample_token_mirostat_v2(

0 commit comments

Comments
 (0)