refactor: update response types to MetaPluginResponse
Co-authored-by: aider (openai/andrew/openrouter/mistralai/mistral-medium-3.1) <aider@aider.chat>
This commit is contained in:
@@ -58,12 +58,12 @@ impl MetaPlugin for DigestSha256MetaPlugin {
|
||||
true
|
||||
}
|
||||
|
||||
fn initialize(&mut self, item_id: i64) -> Result<PluginResponse> {
|
||||
fn initialize(&mut self, item_id: i64) -> Result<MetaPluginResponse> {
|
||||
self.item_id = Some(item_id);
|
||||
Ok(PluginResponse::default())
|
||||
Ok(MetaPluginResponse::default())
|
||||
}
|
||||
|
||||
fn finalize(&mut self) -> Result<PluginResponse> {
|
||||
|
||||
fn finalize(&mut self) -> Result<MetaPluginResponse> {
|
||||
let mut metadata = Vec::new();
|
||||
|
||||
if let Some(item_id) = self.item_id {
|
||||
@@ -77,15 +77,15 @@ impl MetaPlugin for DigestSha256MetaPlugin {
|
||||
}
|
||||
}
|
||||
|
||||
Ok(PluginResponse {
|
||||
Ok(MetaPluginResponse {
|
||||
metadata: Some(metadata),
|
||||
is_finalized: true,
|
||||
})
|
||||
}
|
||||
|
||||
fn update(&mut self, data: &[u8]) -> Result<PluginResponse> {
|
||||
fn update(&mut self, data: &[u8]) -> Result<MetaPluginResponse> {
|
||||
self.hasher.update(data);
|
||||
Ok(PluginResponse::default())
|
||||
Ok(MetaPluginResponse::default())
|
||||
}
|
||||
|
||||
fn meta_name(&self) -> String {
|
||||
|
||||
Reference in New Issue
Block a user