fix: satisfy rust 1.95 clippy

This commit is contained in:
HsungKayphoon
2026-05-17 00:00:46 +08:00
parent c5e26a1ed6
commit d290a1fdb9
2 changed files with 3 additions and 3 deletions

View File

@@ -971,7 +971,7 @@ fn sql_string_literal(value: &str) -> String {
fn hex_decode(value: &str, column_name: &str) -> Result<Vec<u8>, DataLayerError> {
let value = value.trim();
if value.len() % 2 != 0 {
if !value.len().is_multiple_of(2) {
return Err(DataLayerError::InvalidInput(format!(
"sqlite copy column '{column_name}' has odd-length hex data"
)));

View File

@@ -2058,8 +2058,8 @@ mod tests {
use super::SqliteProviderCatalogReadRepository;
use crate::lifecycle::migrate::run_sqlite_migrations;
use crate::repository::provider_catalog::{
ProviderCatalogKeyListOrder, ProviderCatalogKeyListQuery, ProviderCatalogReadRepository,
StoredProviderCatalogEndpoint, StoredProviderCatalogKey, StoredProviderCatalogProvider,
ProviderCatalogKeyListOrder, ProviderCatalogKeyListQuery, StoredProviderCatalogEndpoint,
StoredProviderCatalogKey, StoredProviderCatalogProvider,
};
use serde_json::json;