Run clippy fix
This commit is contained in:
@@ -213,14 +213,13 @@ impl LocationHistoryDao for SqliteLocationHistoryDao {
|
||||
.expect("Unable to get LocationHistoryDao");
|
||||
|
||||
// Validate embedding dimensions if provided (rare for location data)
|
||||
if let Some(ref emb) = location.embedding {
|
||||
if emb.len() != 768 {
|
||||
if let Some(ref emb) = location.embedding
|
||||
&& emb.len() != 768 {
|
||||
return Err(anyhow::anyhow!(
|
||||
"Invalid embedding dimensions: {} (expected 768)",
|
||||
emb.len()
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
let embedding_bytes = location
|
||||
.embedding
|
||||
@@ -289,15 +288,14 @@ impl LocationHistoryDao for SqliteLocationHistoryDao {
|
||||
conn.transaction::<_, anyhow::Error, _>(|conn| {
|
||||
for location in locations {
|
||||
// Validate embedding if provided (rare)
|
||||
if let Some(ref emb) = location.embedding {
|
||||
if emb.len() != 768 {
|
||||
if let Some(ref emb) = location.embedding
|
||||
&& emb.len() != 768 {
|
||||
log::warn!(
|
||||
"Skipping location with invalid embedding dimensions: {}",
|
||||
emb.len()
|
||||
);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
let embedding_bytes = location
|
||||
.embedding
|
||||
|
||||
Reference in New Issue
Block a user