fix(sort): update rlimit fetching to use fd_soft_limit with error handling
Replace direct call to get_rlimit()? with fd_soft_limit(), adding a check for None value to return a usage error if rlimit cannot be fetched. This improves robustness on Linux by ensuring proper error handling when retrieving the file descriptor soft limit.
ba5f673
2 months ago
by mattsu2020
+1.82%
Merge branch 'main' into sort_-compatibility
c4e8472
2 months ago
by mattsu2020
+0.11%
Merge branch 'main' into sort_-compatibility
1715d4f
1 month ago
by mattsu2020
0%
refactor(sort): restrict nix::libc and fd_soft_limit to Linux
Update conditional compilation attributes from #[cfg(unix)] to #[cfg(target_os = "linux")]
for the nix::libc import and fd_soft_limit function implementations, ensuring these
features are only enabled on Linux systems to improve portability and avoid issues
on other Unix-like platforms.
dc309e6
1 month ago
by mattsu2020
+2.05%
refactor(sort): reorder imports in get_rlimit for consistency
Reordered the nix::sys::resource imports to group constants first (RLIM_INFINITY), then types (Resource), and finally functions (getrlimit), improving code readability and adhering to import style guidelines.