清理像素规整重构残留的死代码

restore_editor_generated_image_output_dimensions 在本分支把
restore_editor_generated_image_output_dimensions_or_original 改为转发到
_with_filter 之后失去全部生产调用者,仅剩单测在用,非测试构建报 dead_code。

删除该包装函数,改由测试直接调用 _with_filter 并显式传 Lanczos3。

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
2026-07-29 08:22:41 +00:00
parent ac9797b5c3
commit a97b12d73a
@@ -3273,19 +3273,6 @@ async fn apply_editor_postprocessed_alpha_and_pixel_art_from_persisted_provider_
}
}
fn restore_editor_generated_image_output_dimensions(
output: &DownloadedOpenAiImage,
model: &str,
target_size: &str,
) -> Result<Option<DownloadedOpenAiImage>, AppError> {
restore_editor_generated_image_output_dimensions_with_filter(
output,
model,
target_size,
image::imageops::FilterType::Lanczos3,
)
}
fn restore_editor_generated_image_output_dimensions_with_filter(
output: &DownloadedOpenAiImage,
model: &str,
@@ -9183,10 +9170,11 @@ mod tests {
mime_type: "image/png".to_string(),
extension: "png".to_string(),
};
let restored = restore_editor_generated_image_output_dimensions(
let restored = restore_editor_generated_image_output_dimensions_with_filter(
&provider_output,
GPT_IMAGE_2_MODEL,
"720x540",
image::imageops::FilterType::Lanczos3,
)
.expect("provider output should restore delivery dimensions")
.expect("mismatched provider output should require a transformation");