64 Commits

Author SHA1 Message Date
Jonas Platte
fe70d158e7
Implement string comparison for identifier types 2020-04-16 13:54:06 +02:00
Jonas Platte
3945f88e10
New representation for identifiers
Identifiers now always own just a single allocation, and implement AsRef<str>.
PartialOrd and Ord implementations were also added at the same time. All
identifiers except RoomVersionId can now also be converted to String without
allocation.
2020-04-15 13:54:31 +02:00
Jonas Platte
04e03db41d
Remove redundant spaces 2020-04-03 19:11:03 +02:00
Marcel
81fb260a46
Add support for historical uppercase user IDs 2020-02-17 09:31:46 +01:00
Jonas Platte
03555a3aed
Replace nth(0) with next() 2020-02-17 01:08:15 +01:00
Jonas Platte
7d3cfd769e
ID deserialization: Borrow from the deserializer if possible
… by using Cow<'_, str> instead of String
2019-12-15 20:40:51 +01:00
Jonas Platte
2a0414cd60
Remove unnecessary explicit lifetimes 2019-12-15 20:39:03 +01:00
Jonas Platte
f21f4b4733
Replace .err().unwrap() with .unwrap_err() 2019-12-14 16:00:11 +01:00
Jonas Platte
d19d9c054f
Support historical user IDs 2019-12-14 15:58:23 +01:00
Jonas Platte
32733cf782
Further simplify deserialization 2019-12-10 22:42:46 +01:00
Jonas Platte
d120f77635
Simplify deserialization 2019-12-10 11:54:09 +01:00
Jonas Platte
11841f91b8
Remove regex, once_cell deps 2019-12-10 11:41:30 +01:00
Jonas Platte
7fa1407d76
Update set of allowed characters in UserId localpart 2019-12-09 17:43:15 +01:00
Jonas Platte
f84b7f2b7f
Bump MSRV to 1.36.0 2019-11-22 11:09:17 +01:00
Jonas Platte
3141f3e9a1
Fix Rust 2018 idiom warning
with `cargo fix --all-features`
2019-11-12 01:53:18 +01:00
Jonas Platte
3b10faad0e
Add #![warn(rust_2018_idioms)] 2019-11-12 01:24:57 +01:00
Jonas Platte
3e3e7cb7b3 Fix missing 2019-11-01 11:11:05 +01:00
Jonas Platte
f994672db5 Replace lazy_static with once_cell 2019-10-31 22:55:24 +01:00
Jonas Platte
31b683ab69 Remove #![deny(warnings)], #![warn(clippy::…)] 2019-10-31 22:33:55 +01:00
Jonas Platte
70d4f83ba3 Allow clippy::use_self 2019-10-31 22:33:20 +01:00
Jonas Platte
26068c462d Remove unneeded clones 2019-10-31 22:33:12 +01:00
Jonas Platte
4bafdb1ed7 Change invalid host tests from '-' to '/' 2019-07-23 21:34:42 +02:00
Jimmy Cuadra
9506c565e0 Add support for room version 5. 2019-06-16 01:29:54 -07:00
Jimmy Cuadra
b37bb53495 Add DeviceId. 2019-06-03 12:13:11 -07:00
Jimmy Cuadra
9011423eea Consistently use localpart instead of opaque_id and use homeserver_host instead of server_name. 2019-06-03 12:11:57 -07:00
Jimmy Cuadra
fb8039ac6d Support event ID formats for all room versions. 2019-06-03 11:52:15 -07:00
Jimmy Cuadra
6d9b3c7bf2 Add RoomVersionId. 2019-06-03 10:21:57 -07:00
Jimmy Cuadra
44de3bcb4d Move each type into its own module. 2019-06-03 09:00:04 -07:00
Jimmy Cuadra
1f7ac74adb Add rustfmt and clippy to CI and address clippy warnings. 2019-06-02 18:57:28 -07:00
Jimmy Cuadra
7059bc4ff3 Add missing closing doc test marker. 2019-06-01 03:06:38 -07:00
Jimmy Cuadra
1c5c1f92d6 Reintroduce macro_use for Diesel to import custom derives. 2019-04-12 03:54:28 -07:00
Jimmy Cuadra
eda32dfdb5 Remove try_from feature from doctests. 2019-04-11 17:35:54 -07:00
Jimmy Cuadra
56958147ca Update dependencies, remove Diesel workaround, remove try_from feature. 2019-04-08 17:05:56 -07:00
Jonas Platte
8f130f95e6 Update to Rust 2018, work around a warning for diesel 2019-02-11 13:28:09 +01:00
Andreas Studer
c8aeee8271 Allow types to be used as compound keys 2019-02-04 23:13:52 +01:00
Jonas Platte
05f7e6b0a8 Configure rustfmt for nested imports, re-run 'cargo fmt' 2019-01-08 19:53:25 +01:00
Jimmy Cuadra
78b0d1e054 Update Diesel integration to Diesel 1.0. 2018-06-10 01:05:32 -07:00
Jimmy Cuadra
7ba979a411 Derive more traits for Error. 2018-05-24 04:04:19 -07:00
Jimmy Cuadra
c31794f581 Use new rand 0.5 API. 2018-05-24 04:04:08 -07:00
Digital
3a4041982c Add unicode compatibility for identifiers
Fix issue with unicode character boundaries in parse_id.
Add Unit test for unicode room aliases.
2018-04-04 14:31:16 +02:00
Jimmy Cuadra
418c91d5ff Update serde and serde_json to 1.0. 2017-04-20 21:57:36 -07:00
Jimmy Cuadra
9181220917 Update TryFrom::Err to TryFrom::Error. 2017-03-24 01:31:33 -07:00
Jimmy Cuadra
e4c3cae7fd Add missing Diesel implementations. 2017-02-08 22:25:01 -08:00
Jimmy Cuadra
c6b959c7a1 Update to Diesel 0.10. 2017-02-03 03:11:35 -08:00
Jimmy Cuadra
67ee31b3aa Update to serde 0.9, regex 0.2, and url 1.4. 2017-01-26 00:08:17 -08:00
Jimmy Cuadra
059b747cbb Add a little more detail to the RoomIdOrAliasId docstring. 2016-12-20 22:58:05 -08:00
Andreas Brönnimann
5c729ca988 Add RoomIdOrAliasId 2016-12-17 12:30:25 +01:00
Jimmy Cuadra
ff55576d0f Update deps, remove question_mark feature, bump version to 0.4.2. 2016-10-16 15:52:06 -07:00
Jimmy Cuadra
9da1442ffc Automatically downcase UserId localparts. 2016-08-28 04:27:32 -07:00
Jimmy Cuadra
971948d386 Add Diesel integration. 2016-08-27 03:50:12 -07:00