mirror of
https://github.com/LemmyNet/activitypub-federation-rust.git
synced 2024-05-11 05:32:41 +00:00
fix tests
This commit is contained in:
parent
523983b094
commit
7ca293eeb4
|
@ -56,7 +56,7 @@ where
|
||||||
/// #[derive(serde::Deserialize)]
|
/// #[derive(serde::Deserialize)]
|
||||||
/// struct Note {
|
/// struct Note {
|
||||||
/// #[serde(deserialize_with = "deserialize_one")]
|
/// #[serde(deserialize_with = "deserialize_one")]
|
||||||
/// to: Url
|
/// to: [Url; 1]
|
||||||
/// }
|
/// }
|
||||||
///
|
///
|
||||||
/// let note = serde_json::from_str::<Note>(r#"{"to": ["https://example.com/u/alice"] }"#);
|
/// let note = serde_json::from_str::<Note>(r#"{"to": ["https://example.com/u/alice"] }"#);
|
||||||
|
@ -125,7 +125,7 @@ mod tests {
|
||||||
#[derive(serde::Deserialize)]
|
#[derive(serde::Deserialize)]
|
||||||
struct Note {
|
struct Note {
|
||||||
#[serde(deserialize_with = "deserialize_one")]
|
#[serde(deserialize_with = "deserialize_one")]
|
||||||
_to: Url,
|
_to: [Url; 1],
|
||||||
}
|
}
|
||||||
|
|
||||||
let note = serde_json::from_str::<Note>(
|
let note = serde_json::from_str::<Note>(
|
||||||
|
|
Loading…
Reference in a new issue