forked from extern/nushell
Make SpanId
and RegId
also use new ID struct (#13963)
# Description In the PR #13832 I used some newtypes for the old IDs. `SpanId` and `RegId` already used newtypes, to streamline the code, I made them into the same style as the other marker-based IDs. Since `RegId` should be a bit smaller (it uses a `u32` instead of `usize`) according to @devyn, I made the `Id` type generic with `usize` as the default inner value. The question still stands how `Display` should be implemented if even. # User-Facing Changes Users of the internal values of `RegId` or `SpanId` have breaking changes but who outside nushell itself even uses these? # After Submitting The IDs will be streamlined and all type-safe.
This commit is contained in:
@ -584,7 +584,7 @@ impl Expression {
|
||||
Expression {
|
||||
expr,
|
||||
span,
|
||||
span_id: SpanId(0),
|
||||
span_id: SpanId::new(0),
|
||||
ty,
|
||||
custom_completion: None,
|
||||
}
|
||||
|
Reference in New Issue
Block a user