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:
@@ -216,7 +216,8 @@ impl MetaPlugin for TextMetaPlugin {
|
|||||||
if self.is_binary_content == Some(false) && !self.buffer.is_empty() {
|
if self.is_binary_content == Some(false) && !self.buffer.is_empty() {
|
||||||
// Count any remaining words/lines in the buffer if we haven't already
|
// Count any remaining words/lines in the buffer if we haven't already
|
||||||
if self.word_count == 0 && self.line_count == 0 {
|
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(
|
if let Some(meta_data) = crate::meta_plugin::process_metadata_outputs(
|
||||||
|
|||||||
@@ -161,7 +161,7 @@ impl MetaService {
|
|||||||
&self,
|
&self,
|
||||||
conn: &Connection,
|
conn: &Connection,
|
||||||
item_id: i64,
|
item_id: i64,
|
||||||
plugin: &Box<dyn MetaPlugin>,
|
_plugin: &Box<dyn MetaPlugin>,
|
||||||
response: crate::meta_plugin::MetaPluginResponse,
|
response: crate::meta_plugin::MetaPluginResponse,
|
||||||
) {
|
) {
|
||||||
for meta_data in response.metadata {
|
for meta_data in response.metadata {
|
||||||
|
|||||||
Reference in New Issue
Block a user