fix: resolve mutable borrow error in text plugin

Co-authored-by: aider (openai/andrew/openrouter/qwen/qwen3-coder) <aider@aider.chat>
This commit is contained in:
Andrew Phillips
2025-08-26 19:09:10 -03:00
parent 80c6573e71
commit 9f9e2749a9
2 changed files with 3 additions and 2 deletions

View File

@@ -216,7 +216,8 @@ impl MetaPlugin for TextMetaPlugin {
if self.is_binary_content == Some(false) && !self.buffer.is_empty() {
// Count any remaining words/lines in the buffer if we haven't already
if self.word_count == 0 && self.line_count == 0 {
self.count_text_stats(&self.buffer);
let buffer_copy = self.buffer.clone();
self.count_text_stats(&buffer_copy);
}
if let Some(meta_data) = crate::meta_plugin::process_metadata_outputs(