Jonas Platte
ebd812bcda
Add missing semicolons
2021-09-13 19:02:33 +02:00
Jonas Platte
dc842f028f
Add missing commas
2021-08-30 17:34:20 +02:00
Jonas Platte
15ec0bd78e
api-macros: Fix issues from previous refactoring
2021-08-16 22:37:06 +02:00
Jonas Platte
96ab1674af
api-macros: Use serde(transparent) for newtype bodies
...
… rather than special casing them in many places.
2021-08-16 22:23:30 +02:00
Jonas Platte
42fda7c89f
api: Rename newtype raw body => raw body
2021-08-16 22:23:30 +02:00
Jonas Platte
eab96c7808
api-macros: Fix (de)serialization of newtype bodies
2021-08-16 22:18:14 +02:00
Jonas Platte
4e72c374b9
api-macros: Small refactor
2021-08-12 11:59:00 +02:00
Jonas Platte
696c9fba4e
api-macros: Move ruma_api! trait impl generation into derive macros
2021-08-05 21:00:43 +02:00
Devin Ragotzy
3101be1f99
Add macro-braces, disallowed-type and import-rename clippy lints
2021-07-22 14:34:30 +02:00
Jonas Platte
9b2602649f
Stop special-casing zero fields in macro code
2021-07-09 15:10:22 +02:00
Jonas Platte
a59c43321f
api-macros: Refactor unique_lifetimes_to_tokens
2021-07-07 16:14:41 +02:00
Devin Ragotzy
82fca86d70
api-macro: Fix fields without cfg attributes being emitted
2021-07-04 07:55:51 -04:00
Jonas Platte
4dfaad104b
Enable clippy lint str_to_string
2021-07-02 23:02:50 +02:00
Jonas Platte
f0a33c1a12
api: Remove unused derive in macro code
...
… which was relying on a syn feature not explicitly activated in the crate.
2021-06-24 15:02:24 +02:00
Jonas Platte
7708deda4e
Allow our proc-macros to be used when re-exported from matrix-sdk
2021-06-23 16:17:53 +02:00
Jonas Platte
5db8373117
api: Add missing anonymous lifetime
2021-06-20 12:27:51 +02:00
Jonas Platte
d467eaf621
api: Ignore SendAccessToken::Always on non-client-api endpoints
2021-06-20 12:17:17 +02:00
Jonas Platte
e622803679
Use bool::then to simplify some code
2021-06-17 19:43:22 +02:00
Jonas Platte
105bb9cf67
Use format_ident! in import helper functions
2021-06-06 15:59:22 +02:00
Jonas Platte
4d3cb94d99
api: Remove unneeded extra-traits syn feature
2021-05-17 00:50:45 +02:00
Jonas Platte
073b699660
api-macros: Fix tiny formatting inconsistency
2021-05-14 23:12:56 +02:00
gnieto
b610a725e8
Make try_into_http_response
more safe
...
Remove `expect`s and `unwrap`s from `try_into_http_response`.
2021-05-08 20:22:06 +02:00
gnieto
e2eb92b8ed
Prevent panic on requests with invalid URIs
...
When `try_into_http_request` was used with an invalid base URI the code
was panicking. Acording to `http::request::Builder` documentation,
`headers_mut` returns `None` if the builder contains errors, which was
the case when an invalid URI was provided.
The new version only sets the additional headers in case that there are
no errors on the builder, preventing the panic. The conversion will
return an error when the builder is consumed on `body`.
2021-05-08 18:12:56 +02:00
Jonas Platte
a0f7e1b771
api: Replace error::Void by error::MatrixError
2021-05-08 14:33:12 +02:00
Jonas Platte
729fb51d77
Remove allow(clippy::lint) attributes that are no longer necessary
2021-05-06 14:31:52 +02:00
Jonas Platte
1dc72de70e
Remove allow(clippy::inconsistent_struct_constructor)
...
The lint was buggy, but that has now been fixed.
2021-05-06 14:31:52 +02:00
Devin Ragotzy
c6aa2e0428
Fix clippy warnings across workspace
2021-05-06 06:16:28 -04:00
Jonas Platte
cf291bd5ba
Clean up lint attributes
2021-05-05 23:39:52 +02:00
Jonas Platte
3db0ea7026
Move all crates into a new crates directory
2021-05-03 15:50:27 +02:00