Skip to content

Commit 7992826

Browse files
committed
fix: add #[cfg(windows)] to parallel search structs
OwnedQueryFilters and DriveResult are only used in Windows-only search_multi_drive_filtered(), so they need cfg(windows) to avoid dead_code errors on non-Windows platforms.
1 parent 06c1eee commit 7992826

File tree

6 files changed

+478
-312
lines changed

6 files changed

+478
-312
lines changed

Cargo.lock

Lines changed: 8 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ members = [
3232
# Workspace Package Metadata (inherited by all crates)
3333
# ─────────────────────────────────────────────────────────────────────────────
3434
[workspace.package]
35-
version = "0.2.5"
35+
version = "0.2.6"
3636
edition = "2024"
3737
rust-version = "1.85"
3838
license = "MPL-2.0 OR LicenseRef-UFFS-Commercial"

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ Traditional file search tools (including `os.walk`, `FindFirstFile`, etc.) work
2121

2222
**UFFS reads the MFT directly** - once - and queries it in memory using Polars DataFrames. This is like reading the entire phonebook once instead of looking up each name individually.
2323

24-
### Benchmark Results (v0.2.5)
24+
### Benchmark Results (v0.2.6)
2525

2626
| Drive Type | Records | Time | Throughput |
2727
|------------|---------|------|------------|
@@ -33,7 +33,7 @@ Traditional file search tools (including `os.walk`, `FindFirstFile`, etc.) work
3333

3434
| Comparison | Records | Time | Notes |
3535
|------------|---------|------|-------|
36-
| **UFFS v0.2.5** | **18.7 Million** | **~142 seconds** | All disks, fast mode |
36+
| **UFFS v0.2.6** | **18.7 Million** | **~142 seconds** | All disks, fast mode |
3737
| UFFS v0.1.30 | 18.7 Million | ~315 seconds | Baseline |
3838
| Everything | 19 Million | 178 seconds | All disks |
3939
| WizFile | 6.5 Million | 299 seconds | Single HDD |

crates/uffs-cli/src/commands.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -291,6 +291,7 @@ fn write_results(
291291
/// Owned version of `QueryFilters` for parallel tasks.
292292
///
293293
/// This struct owns all its data so it can be sent across thread boundaries.
294+
#[cfg(windows)]
294295
#[derive(Clone)]
295296
struct OwnedQueryFilters {
296297
/// Parsed search pattern (glob, regex, or literal).
@@ -309,6 +310,7 @@ struct OwnedQueryFilters {
309310
limit: u32,
310311
}
311312

313+
#[cfg(windows)]
312314
impl OwnedQueryFilters {
313315
/// Create owned filters from borrowed filters.
314316
fn from_borrowed(filters: &QueryFilters<'_>) -> Self {
@@ -358,6 +360,7 @@ impl OwnedQueryFilters {
358360
}
359361

360362
/// Result from a single drive read operation.
363+
#[cfg(windows)]
361364
struct DriveResult {
362365
/// Drive letter that was read.
363366
drive: char,

0 commit comments

Comments
 (0)