Change return type of get_whisper_version (closes #241)

This commit is contained in:
Niko 2025-08-19 21:48:24 -07:00
parent b376a1ef64
commit 3e6d3da162
No known key found for this signature in database

View file

@ -87,7 +87,7 @@ pub unsafe fn set_log_callback(
} }
/// Get the current `whisper.cpp` version. /// Get the current `whisper.cpp` version.
pub fn get_whisper_version() -> &str { pub fn get_whisper_version() -> &'static str {
let ptr = unsafe { whisper_rs_sys::whisper_version() }; let ptr = unsafe { whisper_rs_sys::whisper_version() };
assert!(!ptr.is_null()); assert!(!ptr.is_null());
unsafe { CStr::from_ptr(ptr) } unsafe { CStr::from_ptr(ptr) }