Skip to content

Commit 4bcc86c

Browse files
committed
{"schema":"cmsg/1","type":"fix","scope":"global","summary":"normalize return spacing for space-004 rule","intent":"enforce one blank line before explicit returns and final tail expressions","impact":"removes space-004 violations without changing runtime behavior","breaking":false,"risk":"low","refs":[]}
1 parent 1bbdbfa commit 4bcc86c

25 files changed

Lines changed: 40 additions & 0 deletions

File tree

apps/elf-api/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,5 +66,6 @@ fn init_tracing(config: &elf_config::Config) -> color_eyre::Result<()> {
6666
EnvFilter::try_new(&config.service.log_level).unwrap_or_else(|_| EnvFilter::new("info"));
6767

6868
tracing_subscriber::fmt().with_env_filter(filter).init();
69+
6970
Ok(())
7071
}

apps/elf-api/src/state.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ impl AppState {
1616

1717
let qdrant = QdrantStore::new(&config.storage.qdrant)?;
1818
let service = ElfService::new(config, db, qdrant);
19+
1920
Ok(Self { service: Arc::new(service) })
2021
}
2122
}

apps/elf-eval/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1072,6 +1072,7 @@ fn percentile(values: &[f64], percentile: f64) -> f64 {
10721072
values[lower]
10731073
} else {
10741074
let weight = pos - lower as f64;
1075+
10751076
values[lower] * (1.0 - weight) + values[upper] * weight
10761077
}
10771078
}

apps/elf-worker/src/worker.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -492,12 +492,14 @@ async fn handle_upsert(state: &WorkerState, job: &IndexingOutboxEntry) -> Result
492492
let note = fetch_note(&state.db, job.note_id).await?;
493493
let Some(note) = note else {
494494
tracing::info!(note_id = %job.note_id, "Note missing for outbox job. Marking done.");
495+
495496
return Ok(());
496497
};
497498
let now = OffsetDateTime::now_utc();
498499

499500
if !note_is_active(&note, now) {
500501
tracing::info!(note_id = %job.note_id, "Note inactive or expired. Skipping index.");
502+
501503
return Ok(());
502504
}
503505

packages/elf-chunking/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ pub fn split_text(text: &str, cfg: &ChunkingConfig, tokenizer: &Tokenizer) -> Ve
7272
text: current,
7373
});
7474
}
75+
7576
chunks
7677
}
7778

packages/elf-domain/src/cjk.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
pub fn contains_cjk(input: &str) -> bool {
22
input.chars().any(|c| {
33
let code = c as u32;
4+
45
matches!(
56
code,
67
0x3000..=0x303F

packages/elf-providers/src/embedding.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ pub async fn embed(
1111
) -> Result<Vec<Vec<f32>>> {
1212
if cfg.provider_id == "local" {
1313
let dim = cfg.dimensions as usize;
14+
1415
return Ok(texts.iter().map(|text| local_embed(dim, text)).collect());
1516
}
1617

@@ -63,6 +64,7 @@ fn local_embed(dim: usize, text: &str) -> Vec<f32> {
6364
}
6465

6566
l2_normalize(&mut vec);
67+
6668
vec
6769
}
6870

@@ -76,6 +78,7 @@ fn normalize_ascii_alnum_lowercase(text: &str) -> String {
7678
normalized.push(' ');
7779
}
7880
}
81+
7982
normalized
8083
}
8184

packages/elf-providers/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,5 +23,6 @@ pub fn auth_headers(api_key: &str, default_headers: &Map<String, Value>) -> Resu
2323

2424
headers.insert(HeaderName::from_bytes(key.as_bytes())?, raw.parse()?);
2525
}
26+
2627
Ok(headers)
2728
}

packages/elf-service/src/add_note.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -286,6 +286,7 @@ VALUES (
286286
Some(existing_expires_at) => {
287287
let existing_ttl =
288288
(existing_expires_at - existing.updated_at).whole_days() as i64;
289+
289290
existing_ttl == ttl_days
290291
},
291292
None => false,
@@ -459,6 +460,7 @@ fn find_cjk_path(value: &Value, path: &str) -> Option<String> {
459460
return Some(found);
460461
}
461462
}
463+
462464
None
463465
},
464466
Value::Object(map) => {
@@ -469,6 +471,7 @@ fn find_cjk_path(value: &Value, path: &str) -> Option<String> {
469471
return Some(found);
470472
}
471473
}
474+
472475
None
473476
},
474477
_ => None,

packages/elf-service/src/delete.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ FOR UPDATE",
6565
}
6666
if note.status == "deleted" {
6767
tx.commit().await?;
68+
6869
return Ok(DeleteResponse { note_id: note.note_id, op: NoteOp::None });
6970
}
7071

0 commit comments

Comments
 (0)