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
style: fix clippy::pedantic and clippy::nursery warnings
This commit addresses warnings from the pedantic and nursery lint groups:
**Auto-fixed (57 warnings):**
- Converted manual range slicing to `.take()` method calls
- Updated uninlined format arguments
- Simplified redundant field names in struct initialization
- Other automated fixes across 23 files
**Manual fixes:**
1. **build.rs**: Added underscores to long integer literals for readability
- Fixed 4 occurrences of literals > 100 digits
2. **which.rs**: Replaced unsafe transmute with proper pointer operations
- Used `std::ptr::copy_nonoverlapping` for safe byte copying
- Added explicit type annotations for clarity
3. **exec/mod.rs**:
- Replaced `Default::default()` with explicit `ParseShebangOptions::default()`
- Converted nested if-let to `Option::map_or_else` for PATH resolution
4. **Documentation**: Added missing `# Errors` and `# Panics` sections
- payload.rs: encode_payload function
- spawn/mod.rs: handle_exec function
- vite_path lib.rs: current_dir function
- absolute.rs: strip_prefix method
- relative.rs: strip_prefix method
5. **vite_path/relative.rs**: Added `#[allow(clippy::unsafe_derive_deserialize)]`
- Safe to derive Deserialize as validation happens at construction time
6. **vite_tui/app.rs**:
- Changed `App::new()` from `Result<Self>` to `Self` (no errors possible)
- Replaced wildcard match arm with explicit `Action::Error(_)` variant
All tests pass successfully after these changes.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
0 commit comments