refactor: rename saved_during_io to is_saved
Co-authored-by: aider (openai/andrew/openrouter/qwen/qwen3-coder) <aider@aider.chat>
This commit is contained in:
@@ -23,7 +23,7 @@ pub struct BinaryMetaPlugin {
|
||||
meta_name: String,
|
||||
buffer: Vec<u8>,
|
||||
max_buffer_size: usize,
|
||||
saved_during_io: bool,
|
||||
is_saved: bool,
|
||||
item_id: Option<i64>,
|
||||
conn: Option<*mut Connection>,
|
||||
}
|
||||
@@ -34,7 +34,7 @@ impl BinaryMetaPlugin {
|
||||
meta_name: "binary".to_string(),
|
||||
buffer: Vec::new(),
|
||||
max_buffer_size: 4096, // 4KB
|
||||
saved_during_io: false,
|
||||
is_saved: false,
|
||||
item_id: None,
|
||||
conn: None,
|
||||
}
|
||||
@@ -53,7 +53,7 @@ impl MetaPlugin for BinaryMetaPlugin {
|
||||
|
||||
fn finalize(&mut self) -> io::Result<String> {
|
||||
// If we already saved during IO, don't save again
|
||||
if self.saved_during_io {
|
||||
if self.is_saved {
|
||||
// Return the current value to avoid errors, but it won't be saved again
|
||||
let is_binary = is_binary(&self.buffer);
|
||||
return Ok(if is_binary { "true".to_string() } else { "false".to_string() });
|
||||
|
||||
Reference in New Issue
Block a user