You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat!: explicitly require Cow for absolutize_with base parameter (#37)
* feat!: explicitly require Cow for `absolutize_with` base parameter
* fix: address PR review comments and fix Windows CI
- Move `path::Path` import into unix-gated test to fix unused import
warning on Windows (clippy -D warnings)
- Fix comment: `base.normalize()` → `base.absolutize()` since normalize
doesn't resolve relative bases against cwd
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
-**`src/sugar_path.rs`** — Trait definition with doc examples
35
35
-**`src/impl_sugar_path.rs`** — All implementations. Two impl blocks: one for `Path`, one for `T: Deref<Target = str>`. Contains `normalize_inner()`, `needs_normalization()`, `relative_str()` and helper functions
36
-
-**`src/utils.rs`** — `IntoCowPath` trait for flexible base-path input in `absolutize_with`
36
+
-**`src/utils.rs`** — `get_current_dir()` helper for `absolutize()`
37
37
38
38
Key patterns:
39
39
-`Cow<'_, Path>` return types to avoid allocation when the input is already clean
0 commit comments