From a07e27ed421b24f36dc017e20e2e5359be569993 Mon Sep 17 00:00:00 2001 From: Chris Raethke Date: Tue, 21 Nov 2023 18:30:59 +1000 Subject: [PATCH] Update WhisperContextParameters to &mut to avoid borrow issues --- src/whisper_ctx.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/whisper_ctx.rs b/src/whisper_ctx.rs index eaa8302..330391e 100644 --- a/src/whisper_ctx.rs +++ b/src/whisper_ctx.rs @@ -551,7 +551,7 @@ impl WhisperContextParameters { pub fn new() -> Self { Self::default() } - pub fn use_gpu(mut self, use_gpu: bool) -> Self { + pub fn use_gpu(&mut self, use_gpu: bool) -> &mut Self { self.use_gpu = use_gpu; self }