Commit 55be653
committed
Remove unusable init overloads taking [UInt8].IEEE754
[UInt8].IEEE754 has internal init, so users cannot construct it directly.
Providing init overloads that accept it as parameter is pointless since
the only way to get [UInt8].IEEE754 is via bytes.ieee754 property.
Changes:
- Remove Double.init?(_ ieee754: [UInt8].IEEE754, endianness:)
- Remove Float.init?(_ ieee754: [UInt8].IEEE754, endianness:)
- Update tests to use Direct(bytes:) instead of Type(bytes.ieee754)
Available APIs remain:
- Double(bytes: data) - canonical init
- [UInt8](3.14159) - canonical serialization
- Double.ieee754(bytes) - type method
- value.ieee754.bytes() - instance method
Tests: All 12 tests passing1 parent ce9e30a commit 55be653
File tree
2 files changed
+4
-26
lines changed- Sources/IEEE_754
- Tests/IEEE_754_Tests
2 files changed
+4
-26
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | | - | |
71 | | - | |
72 | | - | |
73 | | - | |
74 | | - | |
75 | | - | |
76 | | - | |
77 | 55 | | |
78 | 56 | | |
79 | 57 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
| 15 | + | |
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
33 | | - | |
| 33 | + | |
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
| |||
66 | 66 | | |
67 | 67 | | |
68 | 68 | | |
69 | | - | |
| 69 | + | |
70 | 70 | | |
71 | 71 | | |
72 | 72 | | |
| |||
84 | 84 | | |
85 | 85 | | |
86 | 86 | | |
87 | | - | |
| 87 | + | |
88 | 88 | | |
89 | 89 | | |
90 | 90 | | |
| |||
0 commit comments