feat: update finalize to return Result<()> and simplify save mode
Co-authored-by: aider (openai/andrew/openrouter/qwen/qwen3-coder) <aider@aider.chat>
This commit is contained in:
@@ -46,9 +46,9 @@ impl MetaPlugin for BinaryMetaPlugin {
|
||||
true
|
||||
}
|
||||
|
||||
fn finalize(&mut self) -> io::Result<String> {
|
||||
// Since we save during initialize() or update(), return empty to avoid duplicate saves
|
||||
Ok("".to_string())
|
||||
fn finalize(&mut self) -> Result<()> {
|
||||
// Since we save during initialize() or update(), return Ok to avoid duplicate saves
|
||||
Ok(())
|
||||
}
|
||||
|
||||
fn update(&mut self, data: &[u8]) {
|
||||
@@ -107,9 +107,9 @@ impl MetaPlugin for CwdMetaPlugin {
|
||||
true
|
||||
}
|
||||
|
||||
fn finalize(&mut self) -> io::Result<String> {
|
||||
// Since we save during initialize(), return empty to avoid duplicate saves
|
||||
Ok("".to_string())
|
||||
fn finalize(&mut self) -> Result<()> {
|
||||
// Since we save during initialize(), return Ok to avoid duplicate saves
|
||||
Ok(())
|
||||
}
|
||||
|
||||
fn update(&mut self, _data: &[u8]) {
|
||||
@@ -151,9 +151,9 @@ impl MetaPlugin for UidMetaPlugin {
|
||||
true
|
||||
}
|
||||
|
||||
fn finalize(&mut self) -> io::Result<String> {
|
||||
// Since we save during initialize(), return empty to avoid duplicate saves
|
||||
Ok("".to_string())
|
||||
fn finalize(&mut self) -> Result<()> {
|
||||
// Since we save during initialize(), return Ok to avoid duplicate saves
|
||||
Ok(())
|
||||
}
|
||||
|
||||
fn update(&mut self, _data: &[u8]) {
|
||||
@@ -192,9 +192,9 @@ impl MetaPlugin for UserMetaPlugin {
|
||||
true
|
||||
}
|
||||
|
||||
fn finalize(&mut self) -> io::Result<String> {
|
||||
// Since we save during initialize(), return empty to avoid duplicate saves
|
||||
Ok("".to_string())
|
||||
fn finalize(&mut self) -> Result<()> {
|
||||
// Since we save during initialize(), return Ok to avoid duplicate saves
|
||||
Ok(())
|
||||
}
|
||||
|
||||
fn update(&mut self, _data: &[u8]) {
|
||||
@@ -236,9 +236,9 @@ impl MetaPlugin for GidMetaPlugin {
|
||||
true
|
||||
}
|
||||
|
||||
fn finalize(&mut self) -> io::Result<String> {
|
||||
// Since we save during initialize(), return empty to avoid duplicate saves
|
||||
Ok("".to_string())
|
||||
fn finalize(&mut self) -> Result<()> {
|
||||
// Since we save during initialize(), return Ok to avoid duplicate saves
|
||||
Ok(())
|
||||
}
|
||||
|
||||
fn update(&mut self, _data: &[u8]) {
|
||||
@@ -277,9 +277,9 @@ impl MetaPlugin for GroupMetaPlugin {
|
||||
true
|
||||
}
|
||||
|
||||
fn finalize(&mut self) -> io::Result<String> {
|
||||
// Since we save during initialize(), return empty to avoid duplicate saves
|
||||
Ok("".to_string())
|
||||
fn finalize(&mut self) -> Result<()> {
|
||||
// Since we save during initialize(), return Ok to avoid duplicate saves
|
||||
Ok(())
|
||||
}
|
||||
|
||||
fn update(&mut self, _data: &[u8]) {
|
||||
@@ -321,9 +321,9 @@ impl MetaPlugin for ShellMetaPlugin {
|
||||
true
|
||||
}
|
||||
|
||||
fn finalize(&mut self) -> io::Result<String> {
|
||||
// Since we save during initialize(), return empty to avoid duplicate saves
|
||||
Ok("".to_string())
|
||||
fn finalize(&mut self) -> Result<()> {
|
||||
// Since we save during initialize(), return Ok to avoid duplicate saves
|
||||
Ok(())
|
||||
}
|
||||
|
||||
fn update(&mut self, _data: &[u8]) {
|
||||
@@ -365,9 +365,9 @@ impl MetaPlugin for ShellPidMetaPlugin {
|
||||
true
|
||||
}
|
||||
|
||||
fn finalize(&mut self) -> io::Result<String> {
|
||||
// Since we save during initialize(), return empty to avoid duplicate saves
|
||||
Ok("".to_string())
|
||||
fn finalize(&mut self) -> Result<()> {
|
||||
// Since we save during initialize(), return Ok to avoid duplicate saves
|
||||
Ok(())
|
||||
}
|
||||
|
||||
fn update(&mut self, _data: &[u8]) {
|
||||
@@ -409,9 +409,9 @@ impl MetaPlugin for KeepPidMetaPlugin {
|
||||
true
|
||||
}
|
||||
|
||||
fn finalize(&mut self) -> io::Result<String> {
|
||||
// Since we save during initialize(), return empty to avoid duplicate saves
|
||||
Ok("".to_string())
|
||||
fn finalize(&mut self) -> Result<()> {
|
||||
// Since we save during initialize(), return Ok to avoid duplicate saves
|
||||
Ok(())
|
||||
}
|
||||
|
||||
fn update(&mut self, _data: &[u8]) {
|
||||
@@ -450,9 +450,9 @@ impl MetaPlugin for HostnameMetaPlugin {
|
||||
true
|
||||
}
|
||||
|
||||
fn finalize(&mut self) -> io::Result<String> {
|
||||
// Since we save during initialize(), return empty to avoid duplicate saves
|
||||
Ok("".to_string())
|
||||
fn finalize(&mut self) -> Result<()> {
|
||||
// Since we save during initialize(), return Ok to avoid duplicate saves
|
||||
Ok(())
|
||||
}
|
||||
|
||||
fn update(&mut self, _data: &[u8]) {
|
||||
|
||||
Reference in New Issue
Block a user