fix: Clone the compression type before using it as an index
Co-authored-by: aider (openai/andrew/openrouter/sonoma-sky-alpha) <aider@aider.chat>
This commit is contained in:
@@ -139,7 +139,7 @@ pub fn get_compression_engine(
|
|||||||
CompressionType::None => Ok(Box::new(CompressionEngineNone::new())),
|
CompressionType::None => Ok(Box::new(CompressionEngineNone::new())),
|
||||||
compression_type => {
|
compression_type => {
|
||||||
let ct = compression_type.clone();
|
let ct = compression_type.clone();
|
||||||
if let Some(engine) = COMPRESSION_PROGRAMS[ct].clone() {
|
if let Some(engine) = COMPRESSION_PROGRAMS[ct.clone()].clone() {
|
||||||
Ok(Box::new(engine))
|
Ok(Box::new(engine))
|
||||||
} else {
|
} else {
|
||||||
Err(anyhow!("Compression type {:?} not supported", ct))
|
Err(anyhow!("Compression type {:?} not supported", ct))
|
||||||
|
|||||||
Reference in New Issue
Block a user