diff options
author | gilles henaux <gill.henaux@gmail.com> | 2022-12-24 10:32:46 +0100 |
---|---|---|
committer | gilles henaux <gill.henaux@gmail.com> | 2022-12-24 10:32:46 +0100 |
commit | 028dcba74117a0400e38992a3ff200a133e520e3 (patch) | |
tree | 645200085e443528a77d9b841287cfdbf87d3a32 /src | |
parent | 959cfc6f2830c888c4ccdf694b615a38dccb732f (diff) |
[doc] FIx doc-tests
Diffstat (limited to 'src')
-rw-r--r-- | src/client.rs | 3 | ||||
-rw-r--r-- | src/client/certificate.rs | 5 | ||||
-rw-r--r-- | src/server.rs | 4 |
3 files changed, 7 insertions, 5 deletions
diff --git a/src/client.rs b/src/client.rs index 6f97e55..48b868e 100644 --- a/src/client.rs +++ b/src/client.rs @@ -72,7 +72,8 @@ impl ConnectionConfiguration { /// # Examples /// /// ``` - /// let config = ClientConfigurationData::new( + /// use bevy_quinnet::client::ConnectionConfiguration; + /// let config = ConnectionConfiguration::new( /// "127.0.0.1".to_string(), /// 6000, /// "0.0.0.0".to_string(), diff --git a/src/client/certificate.rs b/src/client/certificate.rs index f0b6e6b..80278f4 100644 --- a/src/client/certificate.rs +++ b/src/client/certificate.rs @@ -77,12 +77,13 @@ pub enum CertificateVerificationMode { /// # Example /// /// ``` -/// TrustOnFirstUseConfig { +/// use bevy_quinnet::client::certificate::TrustOnFirstUseConfig; +/// let config = TrustOnFirstUseConfig { /// known_hosts: bevy_quinnet::client::certificate::KnownHosts::HostsFile( /// "my_own_hosts_file".to_string(), /// ), /// ..Default::default() -/// } +/// }; /// ``` #[derive(Debug, Clone)] pub struct TrustOnFirstUseConfig { diff --git a/src/server.rs b/src/server.rs index b08a8d0..bde4419 100644 --- a/src/server.rs +++ b/src/server.rs @@ -62,6 +62,7 @@ impl ServerConfigurationData { /// # Examples /// /// ``` + /// use bevy_quinnet::server::ServerConfigurationData; /// let config = ServerConfigurationData::new( /// "127.0.0.1".to_string(), /// 6000, @@ -399,11 +400,10 @@ async fn endpoint_task( let endpoint = QuinnEndpoint::server(endpoint_config, endpoint_adr) .expect("Failed to create the endpoint"); - // Handle incoming connections/clients. tokio::select! { _ = close_receiver.recv() => { - trace!("Endpoint incoming connection handler received a requets to close") + trace!("Endpoint incoming connection handler received a request to close") } _ = async { while let Some(connecting) = endpoint.accept().await { |