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:
@@ -114,15 +114,14 @@ impl MetaPlugin for MagicFileMetaPlugin {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
fn finalize(&mut self) -> io::Result<String> {
|
||||
fn finalize(&mut self) -> Result<()> {
|
||||
// Save all magic metadata if not already saved
|
||||
if !self.is_saved {
|
||||
if let Err(e) = self.save_all_magic_metadata() {
|
||||
eprintln!("Warning: Failed to save magic metadata: {}", e);
|
||||
}
|
||||
}
|
||||
// Return empty string since we save during finalize or update
|
||||
Ok("".to_string())
|
||||
Ok(())
|
||||
}
|
||||
|
||||
fn update(&mut self, data: &[u8]) {
|
||||
|
||||
Reference in New Issue
Block a user