Skip to content

Commit

Permalink
Fix server_name docs (#22)
Browse files Browse the repository at this point in the history
  • Loading branch information
rukai authored Dec 8, 2023
1 parent 1303efa commit a29cd33
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/server_name.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,11 @@ use std::error::Error as StdError;
///
/// which will yield a `ServerName<'static>` if successful.
///
/// // or, alternatively...
/// or, alternatively...
///
/// let x = "example.com".try_into().expect("invalid DNS name");
/// # let _: ServerName = x;
/// ```
/// # use rustls_pki_types::ServerName;
/// let x: ServerName = "example.com".try_into().expect("invalid DNS name");
/// ```
#[non_exhaustive]
#[derive(Clone, Eq, Hash, PartialEq)]
Expand Down

0 comments on commit a29cd33

Please sign in to comment.