nushell/crates
Devyn Cairns 13160b3ec3
Replace subtraction of Instants and Durations with saturating subtractions (#12549)
# Description
Duration can not be negative, and an underflow causes a panic.

This should fix #12539 as from what I can tell that bug was caused in
`nu-explore:📟:events` from subtracting durations, but I figured
this might be more widespread, and saturating to zero generally makes
sense.

I also added the relevant clippy lint to try to prevent this from
happening in the future. I can't think of a reason we would ever want to
subtract durations without checking first.

cc @fdncred

# Tests + Formatting
- 🟢 `toolkit fmt`
- 🟢 `toolkit clippy`
- 🟢 `toolkit test`
- 🟢 `toolkit test stdlib`
2024-04-17 07:25:16 -05:00
..
nu-cli Copy-on-write for record values (#12305) 2024-04-14 01:42:03 +00:00
nu-cmd-base Bump version to 0.92.3 (#12476) 2024-04-12 08:00:43 -05:00
nu-cmd-dataframe Copy-on-write for record values (#12305) 2024-04-14 01:42:03 +00:00
nu-cmd-extra Copy-on-write for record values (#12305) 2024-04-14 01:42:03 +00:00
nu-cmd-lang Copy-on-write for record values (#12305) 2024-04-14 01:42:03 +00:00
nu-color-config Bump version to 0.92.3 (#12476) 2024-04-12 08:00:43 -05:00
nu-command Replace subtraction of Instants and Durations with saturating subtractions (#12549) 2024-04-17 07:25:16 -05:00
nu-engine Bump version to 0.92.3 (#12476) 2024-04-12 08:00:43 -05:00
nu-explore Replace subtraction of Instants and Durations with saturating subtractions (#12549) 2024-04-17 07:25:16 -05:00
nu-glob Bump version to 0.92.3 (#12476) 2024-04-12 08:00:43 -05:00
nu-json Bump version to 0.92.3 (#12476) 2024-04-12 08:00:43 -05:00
nu-lsp Bump version to 0.92.3 (#12476) 2024-04-12 08:00:43 -05:00
nu-parser Minor housekeeping in the parser (#12540) 2024-04-17 00:33:50 +02:00
nu-path Bump version to 0.92.3 (#12476) 2024-04-12 08:00:43 -05:00
nu-plugin Bump rmp-serde from 1.1.2 to 1.2.0 (#12547) 2024-04-17 16:44:54 +08:00
nu-plugin-test-support Local socket mode and foreground terminal control for plugins (#12448) 2024-04-15 18:28:18 +00:00
nu-pretty-hex Bump version to 0.92.3 (#12476) 2024-04-12 08:00:43 -05:00
nu-protocol Impl FusedIterator for record iterators (#12542) 2024-04-17 00:34:16 +02:00
nu-std Improve with-env robustness (#12523) 2024-04-16 19:08:58 +08:00
nu-system Replace subtraction of Instants and Durations with saturating subtractions (#12549) 2024-04-17 07:25:16 -05:00
nu-table Copy-on-write for record values (#12305) 2024-04-14 01:42:03 +00:00
nu-term-grid Bump version to 0.92.3 (#12476) 2024-04-12 08:00:43 -05:00
nu-test-support Local socket mode and foreground terminal control for plugins (#12448) 2024-04-15 18:28:18 +00:00
nu-utils Copy-on-write for record values (#12305) 2024-04-14 01:42:03 +00:00
nu_plugin_custom_values Bump version to 0.92.3 (#12476) 2024-04-12 08:00:43 -05:00
nu_plugin_example Bump version to 0.92.3 (#12476) 2024-04-12 08:00:43 -05:00
nu_plugin_formats Bump version to 0.92.3 (#12476) 2024-04-12 08:00:43 -05:00
nu_plugin_gstat Bump version to 0.92.3 (#12476) 2024-04-12 08:00:43 -05:00
nu_plugin_inc Bump version to 0.92.3 (#12476) 2024-04-12 08:00:43 -05:00
nu_plugin_polars Upgrading nu_plugin_polars to polars 0.39.1 (#12551) 2024-04-17 06:35:09 -05:00
nu_plugin_python Python plugin: remove unnecessary fields from signature (#12533) 2024-04-16 06:40:04 -05:00
nu_plugin_query Bump version to 0.92.3 (#12476) 2024-04-12 08:00:43 -05:00
nu_plugin_stress_internals Local socket mode and foreground terminal control for plugins (#12448) 2024-04-15 18:28:18 +00:00
README.md Remove old nushell/merge engine-q 2022-02-07 14:54:06 -05:00

Nushell core libraries and plugins

These sub-crates form both the foundation for Nu and a set of plugins which extend Nu with additional functionality.

Foundational libraries are split into two kinds of crates:

  • Core crates - those crates that work together to build the Nushell language engine
  • Support crates - a set of crates that support the engine with additional features like JSON support, ANSI support, and more.

Plugins are likewise also split into two types:

  • Core plugins - plugins that provide part of the default experience of Nu, including access to the system properties, processes, and web-connectivity features.
  • Extra plugins - these plugins run a wide range of different capabilities like working with different file types, charting, viewing binary data, and more.