191 Commits

Author SHA1 Message Date
Jonas Platte
56cf3ce94c Allow buggy clippy lint on a per-crate basis
The previous method of allowing it through .cargo/config.toml doesn't
seem to work anymore.
2022-06-08 11:45:29 +02:00
Jonas Platte
8912182c56
Increase usage of implicit named arguments in format strings 2022-06-03 10:06:28 +02:00
Jonas Platte
73c2963ebd
Enforce consistent semicolons after ()-typed expressions in blocks 2022-06-03 08:40:16 +02:00
Jonas Platte
07af61d784
Bump MSRV to 1.60 2022-06-01 14:52:02 +02:00
Jonathan de Jong
49c770c9f4
macros: Compress repeated segments of quote!ed macro output 2022-06-01 11:47:07 +02:00
Kévin Commaille
240c8bc4b8 macros: Derive as_str() for types that derive StringEnum 2022-05-30 17:17:06 +02:00
Kévin Commaille
24b4dd69ad macros: Add derive macro to implement as_str() from AsRef<str> 2022-05-30 17:17:06 +02:00
Jonas Platte
e1ebff0047
Set rust-version for crates/* (excl. ruma-signatures) 2022-05-27 12:05:41 +02:00
Jonas Platte
5f902851af
Upgrade to Rust 2021 2022-05-27 12:04:23 +02:00
Kévin Commaille
734770d2bc
macros: Refactor ruma_api attributes parsing 2022-05-23 21:51:47 +02:00
Kévin Commaille
74423b7a4e
events: Split EventMeta between struct and field attributes 2022-05-16 17:08:36 +02:00
Kévin Commaille
1073530ac6 events: Add support for type aliases
Allow to use unstable types
2022-05-16 13:24:25 +02:00
Jonas Platte
e1c35b3d7f
Release ruma-common 0.9.2 2022-05-09 12:51:17 +02:00
Kévin Commaille
abf735093c
events: Fix serde of event types with suffix 2022-05-09 10:41:22 +00:00
Jonas Platte
a36da216ec
Release ruma-common 0.9.1 2022-05-06 17:19:57 +02:00
Kévin Commaille
3ddc4de758 macros: Require event module path for event_enum 2022-05-04 13:11:54 +02:00
Jonas Platte
4e8d88617d
Release ruma-common 0.9.0 2022-04-28 16:38:08 +02:00
Jonas Platte
d412a80127 events: Add original_content accessor for possibly-redacted event enums 2022-04-28 16:32:42 +02:00
Jonas Platte
70ea38b138
Release ruma-identifiers-validation 0.8.1 2022-04-28 15:47:56 +02:00
Jonas Platte
242085cf37
Release ruma-identifiers-validation 0.8.0 2022-04-28 15:46:12 +02:00
Kévin Commaille
5c0a91fae0
events: Implement From<MessageLikeEventType | StateEventType> for RoomEventType 2022-04-28 10:37:27 +02:00
Naman Sandilya
0cdd6a7b0f
Return owned value for origin_server_ts accessors 2022-04-27 10:30:24 +00:00
Jonas Platte
ae7461622c events: Update state key types for all state events
… and make it mandatory to specify for state events.
2022-04-21 11:16:38 +02:00
Jonas Platte
d8b7886382 events: Allow state key type to be customized by content type 2022-04-21 11:16:38 +02:00
Jonas Platte
da222a87c9 macros: Remove trait import 2022-04-21 11:16:38 +02:00
Jonas Platte
cbf71d848a identifiers: Make parse return owned IDs and add parse_box 2022-04-20 10:39:36 +02:00
Jonas Platte
d855ec33d6 identifiers: Update ToOwned implementations to use new types
… and a lot of changes that cascaded from that.
2022-04-20 10:39:36 +02:00
Jonas Platte
ab94bed1dc api: Change Incoming derive to use owned ID types
… except for a few ID types that don't have an owned variant yet.
2022-04-20 10:39:36 +02:00
Jonas Platte
6434fd8c92 identifiers: Add conversions from strings to owned ID types 2022-04-20 10:39:36 +02:00
Jonas Platte
f6c74fa23a identifiers: Add manual Clone impl for owned ID types
… to get rid of unnecessary bounds.
2022-04-20 10:39:36 +02:00
Jonas Platte
ae095cc037
macros: Expand IdZst derive to generic types
… and use it for KeyId.
2022-04-14 13:57:02 +02:00
Jonas Platte
5d8f6748e6
identifiers: Add extra PartialEq implementations for owned ID types 2022-04-14 11:37:35 +02:00
Jonas Platte
d36157a57c
identifiers: Add Display implementation for owned types 2022-04-14 11:37:35 +02:00
Jonas Platte
ed92a4fbd7
identifiers: Implement From<&Id> for String 2022-04-14 11:37:35 +02:00
Jonas Platte
d5656f3399
identifiers: Rename from_owned to from_box 2022-04-14 11:37:35 +02:00
Jonas Platte
f658487c50
identifiers: Replace most macro_rules! code with proc-macro code 2022-04-14 11:16:01 +02:00
Jonas Platte
1db716f643
events: Add transaction_id accessor to applicable event enums 2022-04-13 16:47:42 +02:00
Kévin Commaille
688d5bf47a
docs: Improve string enums documentation
Mention the conversion from string.
2022-04-10 14:48:09 +02:00
Jonas Platte
7de3b4b649
events: Rework the event enum hierarchy 2022-04-05 14:29:17 +02:00
Jonas Platte
f540bbbc99
events: Remove some accessor functions
They will no longer make sense with the new enum hierarchy.
2022-04-05 14:29:17 +02:00
Jonas Platte
51244d5ae7
events: Fix name of internal helper method 2022-04-05 14:29:17 +02:00
Jonas Platte
d87874314b
events: Add 'Original' prefix to unredacted types with a redacted form 2022-04-05 14:29:17 +02:00
Jonas Platte
d614ad1422
macros: Remove PossiblyRedacted event enums 2022-04-05 14:29:17 +02:00
Jonas Platte
1415e32a1d macros: Remove some unnecessary short-circuiting in event proc-macros 2022-04-02 20:31:37 +02:00
Jonas Platte
634f93c985 macros: Improve error handling 2022-04-02 20:31:37 +02:00
Jonas Platte
a50b2d313a events: Remove unnecessary IdentFragment::span implementations 2022-04-02 20:31:37 +02:00
Jonas Platte
c787c8351e macros: Move EVENT_FIELDS out of util.rs
It was only used by the event_enum! macro anyways.
2022-04-02 20:31:37 +02:00
Jonas Platte
a4aa7e0912
macros: Fix missing type qualification in Event derive macro 2022-03-31 18:42:27 +02:00
Jonas Platte
9f56e6e497
events: Rename HierarchySpaceChildStateEvent => HierarchySpaceChildEvent 2022-03-31 18:42:27 +02:00
Jonas Platte
05ad164d21
macros: Fix errors from unused serde attributes with only server feature active 2022-03-25 12:26:52 +01:00