mirror of
https://github.com/fish-shell/fish-shell.git
synced 2024-11-25 09:17:12 +08:00
3a2033b992
Somewhat counter-intuitively, this code is active when compiling under *Linux* and is always false when compiling under Windows. The logic was incorrectly reversed before (it's easier to reason about when you realize that fish doesn't even compile under Windows because it uses tons of libc functions). As the code was actually never compiled, it wasn't actually tested for validity either and there were some issues that prevented it from compiling that have since been fixed. The logic has also been adjusted a bit to make it possible to use the rust-native int parsing instead of `libc::strtod()`. The code has been changed to use `once_cell::race::OnceBool` instead of `once_cell::sync::Lazy<T>` which imposes a greater runtime burden with locking and other overhead. We don't care if the code runs more than once on init (if calls were to race, though they probably don't) - just that the code isn't subsequently executed on each call. The `once_cell::race` module is a better fit here, though it doesn't expose the ergonomic `Lazy<T>` façade around its types. |
||
---|---|---|
.. | ||
src | ||
widestring-suffix | ||
build.rs | ||
Cargo.lock | ||
Cargo.toml |