(shared: &SharedArgs)
| 25 | } |
| 26 | |
| 27 | fn load_entries_inner(shared: &SharedArgs) -> Result<Vec<LoadedEntry>> { |
| 28 | let mut entries = Vec::new(); |
| 29 | let mut seen = HashSet::new(); |
| 30 | for path in paths()? { |
| 31 | for entry in load_entries_from_directory(&path, shared)? { |
| 32 | if let Some(id) = entry_id(&entry) |
| 33 | && !seen.insert(id.to_string()) |
| 34 | { |
| 35 | continue; |
| 36 | } |
| 37 | entries.push(entry); |
| 38 | } |
| 39 | } |
| 40 | entries.sort_by_key(|entry| entry.timestamp); |
| 41 | Ok(entries) |
| 42 | } |
| 43 | |
| 44 | pub(crate) fn load_entries_from_directory( |
| 45 | opencode_dir: &Path, |
no test coverage detected