1133 Commits

Author SHA1 Message Date
Markus Reiter
24fccaf0e4
Merge pull request #555 from tomkris/main
Optimize size of heapless::Vec<_, 0> to 0 bytes
2025-04-24 18:25:41 +00:00
Artem Kryvokrysenko
a81931c078 Optimize size of heapless::Vec<_, 0> to 0 bytes
If `Vec` has 0 capacity, it can store only 0 elements, so its len can be assumed to be always 0.

I'm updating `DefaultLenType` to have a special case: `DefaultLenType<0>` will be represented by zero
sized type which always has value 0.

This allows reducing size of `heapless::Vec<u8, 0>` from 8 bytes to 0 bytes.
2025-04-23 22:44:51 +00:00
Markus Reiter
3a9412dc2a
Merge pull request #552 from GnomedDev/string-generic-length
Add generic LenType to String
2025-04-23 20:03:01 +00:00
GnomedDev
d1993c5634
Add generic LenType to String 2025-04-23 22:00:52 +02:00
Markus Reiter
4e38494d8c
Merge pull request #553 from GnomedDev/sorted-linked-list-lentype
Migrate SortedLinkedList to LenType
2025-04-23 19:57:05 +00:00
GnomedDev
94a9eefc42
Rename LenType::option to LenType::to_non_max 2025-04-20 13:04:16 +01:00
GnomedDev
c92e770960
Migrate SortedLinkedList to LenType 2025-04-20 13:03:17 +01:00
Markus Reiter
ad5a0ee8e1
Merge pull request #549 from raviqqe/cstring
Add `CString` cont.
2025-04-15 19:43:52 +00:00
Yota Toyama
f1577b0797 Implement Debug 2025-04-14 15:33:42 -07:00
Yota Toyama
493768f83f
Merge branch 'main' into cstring 2025-04-15 07:23:36 +09:00
Markus Reiter
a326f1135e
Merge pull request #547 from pvdrz/fix-names
Renaming Bonanza
2025-04-14 21:10:25 +00:00
Yota Toyama
fe2921b2d8 Fix ufmt module 2025-04-10 16:16:17 -07:00
Yota Toyama
b64d1c1cbc Make length type generic 2025-04-10 16:13:57 -07:00
Yota Toyama
120a059abe
Merge branch 'main' into cstring 2025-04-11 08:00:18 +09:00
Yota Toyama
63d95a4351 Use C string shorthands 2025-04-10 15:59:04 -07:00
Yota Toyama
430d9f9a64 Fix comparison tests 2025-04-10 15:58:40 -07:00
Yota Toyama
504e938b0b Remove comparison trait implementations for generic RHS 2025-04-10 15:55:15 -07:00
Yota Toyama
943cfd8a3b Add unsafe block for pop_terminator 2025-04-10 15:48:26 -07:00
Yota Toyama
f9616cf5bb Remove debug assertions 2025-04-10 15:46:05 -07:00
Yota Toyama
b2d201167c
Update src/c_string.rs
Co-authored-by: Markus Reiter <me@reitermark.us>
2025-04-11 06:43:45 +08:00
Yota Toyama
d5e2a5b837
Update src/c_string.rs
Co-authored-by: Markus Reiter <me@reitermark.us>
2025-04-11 06:43:36 +08:00
Yota Toyama
abec9e3783
Update src/c_string.rs
Co-authored-by: Markus Reiter <me@reitermark.us>
2025-04-11 06:43:28 +08:00
Yota Toyama
503262218f
Update src/c_string.rs
Co-authored-by: Markus Reiter <me@reitermark.us>
2025-04-11 06:42:44 +08:00
Christian Poveda
03738160b1
Update changelog 2025-04-10 15:54:12 -05:00
Christian Poveda
b6d10f62fe
Remove Q* type aliases for MpMcQueue, and rename it to just Queue 2025-04-10 15:54:12 -05:00
Christian Poveda
a849a60067
Rename histbuf to history_buf and HistoryBuffer.* to HistoryBuf.* 2025-04-10 15:54:10 -05:00
Christian Poveda
8b55230611
Rename indexset to index_set and only re-export IndexSet 2025-04-10 15:53:06 -05:00
Christian Poveda
7275c51223
Rename indexmap to index_map and only re-export IndexMap 2025-04-10 15:52:16 -05:00
Markus Reiter
fb62d12ad5
Merge pull request #504 from GnomedDev/vec-generic-length
Implement a generic length parameter for Vec<T, N>
2025-04-10 17:45:39 +00:00
Markus Reiter
da404c14fd
Merge pull request #540 from pvdrz/keep-views-only
`SortedLinkedList`: Keep only the view versions of `Iter` and `FindMut`
2025-04-10 17:43:45 +00:00
GnomedDev
ca47366a71
Add #[inline] to LenType trait methods 2025-04-10 17:55:23 +01:00
GnomedDev
92dbf9c1e1
Remove useless Drain documentation 2025-04-10 17:55:23 +01:00
GnomedDev
c8d34b6213
Move LenType implementation to Sealed 2025-04-10 17:55:23 +01:00
GnomedDev
a16a927a33
Implement a generic length parameter for Vec<T, N> 2025-04-10 17:55:22 +01:00
Christian Poveda
0e8f01103e
Update changelog 2025-04-10 10:40:42 -05:00
Christian Poveda
85f1aeae68
Make implementations generic over the storage 2025-04-10 10:40:42 -05:00
Christian Poveda
e395892318
Remove sorted_linked_list::FindMut and sorted_linked_list::FindMutInner 2025-04-10 10:38:51 -05:00
Christian Poveda
9924c673e1
Remove sorted_linked_list::Iter and sorted_linked_list::IterInner 2025-04-10 10:36:51 -05:00
Yota Toyama
1d3b7b495a Fix documentation 2025-04-08 21:52:03 -07:00
Yota Toyama
897fc9f509 Use CStr::from_bytes_with_nul for validation of appended bytes 2025-04-08 21:50:14 -07:00
Yota Toyama
ce6d252f7f
Merge branch 'main' into cstring 2025-04-09 13:45:09 +09:00
Markus Reiter
6ae82d53a5
Merge pull request #541 from rilipco/impl-alloc-interop
Add some conversion options for alloc vecs
2025-04-08 21:03:24 +00:00
Yota Toyama
e9d9dc184e Reorder traits 2025-04-07 19:55:31 -07:00
Yota Toyama
d85e455f3b Fix Default impl 2025-04-07 19:40:24 -07:00
Yota Toyama
4e9bedc6fa Test error type 2025-04-07 19:35:55 -07:00
Yota Toyama
f62cfcd104 Rename unit test 2025-04-07 19:32:55 -07:00
Yota Toyama
9fd495297b Fix test name 2025-04-07 19:32:30 -07:00
Yota Toyama
977ea519d5 Add inline annotations 2025-04-07 19:30:51 -07:00
Yota Toyama
06a737a0aa Refactor Ord impl 2025-04-07 19:29:34 -07:00
Yota Toyama
bbd1d32885 Implement Ord 2025-04-07 19:23:29 -07:00