Commit cdd1bd2
committed
feat(encoding): encode usize and isize
Implement `EncodeGaugeValue` and for `usize` and `isize` and
`EncodeCounterValue` for `usize`. This is very straight forward and the
argument is the same as the one for `EncodeGaugeValue for u64`; if you
don't do this the user code will get littered with `as i64`/`as u64`.
Since these conversions are infallible for `32-bit` platforms, and have
the same issues as the current `u64` impl for `64-bit` platforms, I
don't think there is any problem with adding them.
Signed-off-by: Jalil David Salamé Messina <jalil.salame@gmail.com>1 parent 6bb0b10 commit cdd1bd2
1 file changed
+22
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
607 | 607 | | |
608 | 608 | | |
609 | 609 | | |
| 610 | + | |
| 611 | + | |
| 612 | + | |
| 613 | + | |
| 614 | + | |
| 615 | + | |
| 616 | + | |
| 617 | + | |
| 618 | + | |
| 619 | + | |
| 620 | + | |
| 621 | + | |
| 622 | + | |
| 623 | + | |
| 624 | + | |
610 | 625 | | |
611 | 626 | | |
612 | 627 | | |
| |||
675 | 690 | | |
676 | 691 | | |
677 | 692 | | |
| 693 | + | |
| 694 | + | |
| 695 | + | |
| 696 | + | |
| 697 | + | |
| 698 | + | |
| 699 | + | |
678 | 700 | | |
679 | 701 | | |
680 | 702 | | |
| |||
0 commit comments