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
The format_all_md function used if/else with string slicing, which is
less idiomatic and less safe than pattern matching. This change
refactors the string parsing to use match with strip_prefix, making the
code more readable and maintainable. Also updates function signatures to
accept the most general types needed.
Changes:
- Use match with strip_prefix instead of if/else and string slicing
- Change save_crate_path_name parameter from &PathBuf to &Path
- Remove redundant borrows where string coercion works
- Simplify unwrap_or_else closure to unwrap_or
- Add Path to imports for type consistency
Breaking change:
- None
All 66 tests pass. No clippy warnings.
Co-Authored-By: GLM 4.7 <253101093+zed-agent@users.noreply.github.com>
Signed-off-by: pyk <2213646+pyk@users.noreply.github.com>
0 commit comments