Commit graph

28 commits

Author SHA1 Message Date
1796f08e58
pkstrings: Split Invalid errors
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2021-11-14 15:51:59 +01:00
d54e39dcf6
pkstrings: prefer String::from in example
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2021-11-14 15:46:42 +01:00
5900325086
pkstrings: Move PKString and tests in their own modules
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2021-11-14 15:44:51 +01:00
025828debc pkstrings: New strings example
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2021-11-14 01:49:35 +01:00
ca4c0154e5 edition 2021
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2021-11-14 01:49:35 +01:00
0c0799994d pkstrings: impl TryFrom<u8> for PKString
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2021-11-14 01:49:35 +01:00
19b0f3989e pkstrings: Allow consuming and converting to String
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2021-11-14 01:49:32 +01:00
a82d73122d
pkstrings: prevent addition from overflowing
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2021-11-14 00:20:30 +01:00
cc723f7684
pkstrings: impl fmt::Display for Error
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2021-11-13 21:45:30 +01:00
11e54ded8b
pkstrings: rustfmt in tests
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2020-07-06 01:28:01 +02:00
b5deb06f22 pkstrings: add minimal tests
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2020-07-06 01:26:22 +02:00
cb93e2fae0 pkstrings: Use ranges to reduce match pattern sizes
Thanks ekleog!

Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2020-07-06 01:26:07 +02:00
8c06d00a19
pkstrings: convert STRTOHEX to const fn
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2020-07-06 00:24:21 +02:00
889595a742
pkstrings: convert HEXTOSTR to const fn
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2020-07-06 00:18:09 +02:00
ed9c806096
pkstrings: Remove uneeded assignation
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2020-07-06 00:17:34 +02:00
62a9e24b97
pkstrings: Utilize HashMap's FromIterator impl
Thanks phaazon!

Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2020-07-06 00:05:09 +02:00
fedac8daf7
pkstrings: rustfmt
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2020-07-05 22:36:17 +02:00
0444350885
pkstrings: increase array size for 'index out of bounds'
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2020-07-05 18:22:44 +02:00
93d9994859
pkstrings: convert HEXTOSTR to Vec
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2020-06-30 18:30:15 +02:00
681813f53a
pkstrings: Derive Clone rather
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2020-06-30 18:01:40 +02:00
2785113553
pkstrings: rustfmt
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2020-06-30 17:31:45 +02:00
d3483cc373
pkstrings: Implement Clone
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2020-06-30 17:19:36 +02:00
19853cec29
pkstrings: implement TryFrom<&str> via TryFrom<String>
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2020-06-30 00:54:18 +02:00
0ecc19a2fc
Add LICENSE files
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2020-06-30 00:50:19 +02:00
9bcd27374f
pkstrings: convert example
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2020-06-30 00:47:43 +02:00
4cbb0c50fd
pkstrings: implement Display
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2020-06-30 00:47:33 +02:00
f906a69aaa
pkstring: implement TryFrom<String> and TryFrom<&str>
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2020-06-30 00:04:27 +02:00
be04cdcaa1
pkstring: naïve implementation
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2020-06-29 23:58:17 +02:00