nushell/crates/nu-command/src
Piepmatz f0c83a4459
Replace raw usize IDs with new types (#13832)
# Description

In this PR I replaced most of the raw usize IDs with
[newtypes](https://doc.rust-lang.org/rust-by-example/generics/new_types.html).
Some other IDs already started using new types and in this PR I did not
want to touch them. To make the implementation less repetitive, I made
use of a generic `Id<T>` with marker structs. If this lands I would try
to move make other IDs also in this pattern.

Also at some places I needed to use `cast`, I'm not sure if the type was
incorrect and therefore casting not needed or if actually different ID
types intermingle sometimes.

# User-Facing Changes

Probably few, if you got a `DeclId` via a function and placed it later
again it will still work.
2024-09-30 13:20:15 +02:00
..
bytes Change the usage misnomer to "description" (#13598) 2024-08-22 12:02:08 +02:00
charting Replace raw usize IDs with new types (#13832) 2024-09-30 13:20:15 +02:00
conversions Add search terms to into value (#13890) 2024-09-23 07:55:58 -05:00
database Change the usage misnomer to "description" (#13598) 2024-08-22 12:02:08 +02:00
date Change the usage misnomer to "description" (#13598) 2024-08-22 12:02:08 +02:00
debug Replace raw usize IDs with new types (#13832) 2024-09-30 13:20:15 +02:00
env Replace raw usize IDs with new types (#13832) 2024-09-30 13:20:15 +02:00
experimental Change the usage misnomer to "description" (#13598) 2024-08-22 12:02:08 +02:00
filesystem Set current working directory at startup (#12953) 2024-09-25 13:04:26 -05:00
filters Fix try not working with let, etc. (#13885) 2024-09-23 06:44:25 -05:00
formats Replace raw usize IDs with new types (#13832) 2024-09-30 13:20:15 +02:00
generators Change the usage misnomer to "description" (#13598) 2024-08-22 12:02:08 +02:00
hash add binary as input to hash commands (#13923) 2024-09-25 16:47:52 +08:00
help allow tab to be retained with find (#13848) 2024-09-14 08:51:00 -05:00
math Change the usage misnomer to "description" (#13598) 2024-08-22 12:02:08 +02:00
misc Replace raw usize IDs with new types (#13832) 2024-09-30 13:20:15 +02:00
network Refining error handling in http post (#13805) 2024-09-07 23:57:34 +02:00
path fix path exists on a non-directory file (#13763) 2024-09-11 12:45:39 -05:00
platform Respect $env.config.use_kitty_protocol in input listen (#13892) 2024-09-25 08:57:00 -05:00
random Change the usage misnomer to "description" (#13598) 2024-08-22 12:02:08 +02:00
removed Change the usage misnomer to "description" (#13598) 2024-08-22 12:02:08 +02:00
shells Change the usage misnomer to "description" (#13598) 2024-08-22 12:02:08 +02:00
stor Change the usage misnomer to "description" (#13598) 2024-08-22 12:02:08 +02:00
strings Add --number flag to split column (#13831) 2024-09-12 07:16:33 -05:00
system fix ls_colors coloring in grid and ls (#13935) 2024-09-25 18:16:54 -05:00
viewers fix ls_colors coloring in grid and ls (#13935) 2024-09-25 18:16:54 -05:00
default_context.rs add metadata access command (#13785) 2024-09-11 12:44:06 -05:00
example_test.rs Overhaul $in expressions (#13357) 2024-07-17 16:02:42 -05:00
lib.rs Add top-level crate documentation/READMEs (#12907) 2024-07-14 10:10:41 +02:00
progress_bar.rs Replace ExternalStream with new ByteStream type (#12774) 2024-05-16 07:11:18 -07:00
sort_utils.rs Add derive macros for FromValue and IntoValue to ease the use of Values in Rust code (#13031) 2024-06-17 16:05:11 -07:00