Skip to content

Commit

Permalink
Fix dccp_available_ccids example
Browse files Browse the repository at this point in the history
  • Loading branch information
Thomasdezeeuw committed Nov 28, 2022
1 parent 6ba8141 commit 50a67c5
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/sys/unix.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2199,10 +2199,14 @@ impl crate::Socket {
///
/// The API should be used in the follow way:
///
/// ```
/// ```no_run
/// # fn main() -> std::io::Result<()> {
/// use socket2::{Socket, Domain, Type, Protocol};
/// let socket = Socket::new(Domain::IPV4, Type::DCCP, Some(Protocol::DCCP))?;
/// let (endpoints_array, len) = socket.dccp_available_ccids::<4>();
/// let (endpoints_array, len) = socket.dccp_available_ccids::<4>()?;
/// let endpoints = &endpoints_array[..len];
/// # drop(endpoints);
/// # Ok(()) }
/// ```
///
/// [documentation]: https://www.kernel.org/doc/html/latest/networking/dccp.html
Expand Down

0 comments on commit 50a67c5

Please sign in to comment.