Commit cb270ea
committed
Make transaction::Version field private
This commit addresses rust-bitcoin#4041 by making the transaction::Version field private
Changes:
- Make the `Version` field private with `pub(crate)`
- Rename `non_standard` to `maybe_non_standard` for clarity since it accepts both standard and non-standard versions
- Add `#[inline]` attributes to small, frequently used methods:
- `as_u32`
- `maybe_non_standard`
Users now must use either:
- Constants (`Version::ONE/TWO/THREE`) for standard versions
- `maybe_non_standard` method for any version (standard or non-standard)1 parent 6c69b66 commit cb270ea
File tree
2 files changed
+27
-15
lines changed- bitcoin/src/blockdata
- primitives/src
2 files changed
+27
-15
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
627 | 627 | | |
628 | 628 | | |
629 | 629 | | |
630 | | - | |
631 | | - | |
632 | | - | |
633 | | - | |
634 | | - | |
635 | | - | |
636 | | - | |
637 | | - | |
638 | | - | |
639 | | - | |
640 | | - | |
641 | 630 | | |
642 | 631 | | |
643 | | - | |
| 632 | + | |
644 | 633 | | |
645 | 634 | | |
646 | 635 | | |
647 | 636 | | |
648 | 637 | | |
649 | | - | |
| 638 | + | |
650 | 639 | | |
651 | 640 | | |
652 | 641 | | |
| |||
1373 | 1362 | | |
1374 | 1363 | | |
1375 | 1364 | | |
1376 | | - | |
| 1365 | + | |
1377 | 1366 | | |
1378 | 1367 | | |
1379 | 1368 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
518 | 518 | | |
519 | 519 | | |
520 | 520 | | |
521 | | - | |
| 521 | + | |
522 | 522 | | |
523 | 523 | | |
524 | 524 | | |
| |||
529 | 529 | | |
530 | 530 | | |
531 | 531 | | |
| 532 | + | |
| 533 | + | |
| 534 | + | |
| 535 | + | |
| 536 | + | |
| 537 | + | |
| 538 | + | |
| 539 | + | |
| 540 | + | |
| 541 | + | |
| 542 | + | |
| 543 | + | |
| 544 | + | |
| 545 | + | |
| 546 | + | |
| 547 | + | |
| 548 | + | |
| 549 | + | |
| 550 | + | |
532 | 551 | | |
533 | 552 | | |
534 | 553 | | |
535 | 554 | | |
536 | 555 | | |
537 | 556 | | |
| 557 | + | |
| 558 | + | |
| 559 | + | |
| 560 | + | |
538 | 561 | | |
539 | 562 | | |
540 | 563 | | |
| |||
0 commit comments