Move Outgoing test out of ruma_serde to avoid cyclic dev-dependency

This commit is contained in:
Jonas Platte 2020-12-02 18:51:35 +01:00
parent 55c1dd5ca7
commit e7b5a533d6
No known key found for this signature in database
GPG Key ID: CC154DE0E30B7C67
3 changed files with 8 additions and 3 deletions

View File

@ -23,4 +23,3 @@ serde_json = { version = "1.0.57", features = ["raw_value"] }
[dev-dependencies]
matches = "0.1.8"
ruma-identifiers = { version = "0.17.4", path = "../ruma-identifiers" }

View File

@ -30,6 +30,9 @@ ruma-federation-api = { version = "0.0.3", path = "../ruma-federation-api", opti
ruma-identity-service-api = { version = "0.0.0", path = "../ruma-identity-service-api", optional = true }
ruma-push-gateway-api = { version = "0.0.0", path = "../ruma-push-gateway-api", optional = true }
[dev-dependencies]
serde = { version = "1.0.117", features = ["derive"] }
[features]
either = ["ruma-identifiers/either"]
rand = ["ruma-identifiers/rand"]

View File

@ -1,5 +1,7 @@
use ruma_identifiers::UserId;
use ruma_serde::Outgoing;
// This test should really be part of ruma_serde, but some tooling doesn't like
// cyclic dev-dependencies, which are required for this test to be moved there.
use ruma::{Outgoing, UserId};
#[allow(unused)]
pub struct Thing<'t, T> {
@ -15,6 +17,7 @@ pub struct IncomingThing<T> {
#[allow(unused)]
#[derive(Copy, Clone, Debug, Outgoing, serde::Serialize)]
#[serde(crate = "serde")]
pub struct OtherThing<'t> {
pub some: &'t str,
pub t: &'t [u8],