1
0
Fork 0
mirror of https://gitlab.com/famedly/conduit.git synced 2024-11-02 18:38:52 +01:00

enable FedDest doc-test

Doc rendering is exactly as before, but it now actually tests the code
This commit is contained in:
Jan Christian Grünhage 2022-04-14 16:42:08 +02:00
parent 2fcb3c8b93
commit efe9d5000e

View file

@ -79,12 +79,16 @@ use tracing::{debug, error, info, trace, warn};
/// was no port specified to construct a SocketAddr with. /// was no port specified to construct a SocketAddr with.
/// ///
/// # Examples: /// # Examples:
/// ```rust,ignore /// ```rust
/// # use conduit::server_server::FedDest;
/// # fn main() -> Result<(), std::net::AddrParseError> {
/// FedDest::Literal("198.51.100.3:8448".parse()?); /// FedDest::Literal("198.51.100.3:8448".parse()?);
/// FedDest::Literal("[2001:db8::4:5]:443".parse()?); /// FedDest::Literal("[2001:db8::4:5]:443".parse()?);
/// FedDest::Named("matrix.example.org".to_owned(), "".to_owned()); /// FedDest::Named("matrix.example.org".to_owned(), "".to_owned());
/// FedDest::Named("matrix.example.org".to_owned(), ":8448".to_owned()); /// FedDest::Named("matrix.example.org".to_owned(), ":8448".to_owned());
/// FedDest::Named("198.51.100.5".to_owned(), "".to_owned()); /// FedDest::Named("198.51.100.5".to_owned(), "".to_owned());
/// # Ok(())
/// # }
/// ``` /// ```
#[derive(Clone, Debug, PartialEq)] #[derive(Clone, Debug, PartialEq)]
pub enum FedDest { pub enum FedDest {