Update WhisperContextParameters to &mut to avoid borrow issues

This commit is contained in:
Chris Raethke 2023-11-21 18:30:59 +10:00
parent ef7d037d75
commit a07e27ed42

View file

@ -551,7 +551,7 @@ impl WhisperContextParameters {
pub fn new() -> Self { pub fn new() -> Self {
Self::default() 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.use_gpu = use_gpu;
self self
} }