cleanup: auto-fix clippy warnings in poc-memory
Applied cargo clippy --fix for collapsible_if, manual_char_comparison, and other auto-fixable warnings.
This commit is contained in:
parent
3640de444b
commit
653da40dcd
21 changed files with 99 additions and 149 deletions
|
|
@ -213,13 +213,11 @@ pub fn select_conversation_fragments(n: usize) -> Vec<(String, String)> {
|
|||
if let Ok(files) = fs::read_dir(dir.path()) {
|
||||
for f in files.filter_map(|e| e.ok()) {
|
||||
let p = f.path();
|
||||
if p.extension().map(|x| x == "jsonl").unwrap_or(false) {
|
||||
if let Ok(meta) = p.metadata() {
|
||||
if meta.len() > 50_000 {
|
||||
if p.extension().map(|x| x == "jsonl").unwrap_or(false)
|
||||
&& let Ok(meta) = p.metadata()
|
||||
&& meta.len() > 50_000 {
|
||||
jsonl_files.push(p);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -307,11 +305,10 @@ pub fn mark_observation_done(fragment_ids: &[String]) {
|
|||
Err(_) => return,
|
||||
};
|
||||
for id in fragment_ids {
|
||||
if let Some((session_id, seg_str)) = id.rsplit_once('.') {
|
||||
if let Ok(seg) = seg_str.parse::<u32>() {
|
||||
if let Some((session_id, seg_str)) = id.rsplit_once('.')
|
||||
&& let Ok(seg) = seg_str.parse::<u32>() {
|
||||
let _ = store.mark_segment_mined(session_id, seg, "observation");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue