File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -2199,10 +2199,14 @@ impl crate::Socket {
21992199 ///
22002200 /// The API should be used in the follow way:
22012201 ///
2202- /// ```
2202+ /// ```no_run
2203+ /// # fn main() -> std::io::Result<()> {
2204+ /// use socket2::{Socket, Domain, Type, Protocol};
22032205 /// let socket = Socket::new(Domain::IPV4, Type::DCCP, Some(Protocol::DCCP))?;
2204- /// let (endpoints_array, len) = socket.dccp_available_ccids::<4>();
2206+ /// let (endpoints_array, len) = socket.dccp_available_ccids::<4>()? ;
22052207 /// let endpoints = &endpoints_array[..len];
2208+ /// # drop(endpoints);
2209+ /// # Ok(()) }
22062210 /// ```
22072211 ///
22082212 /// [documentation]: https://www.kernel.org/doc/html/latest/networking/dccp.html
You can’t perform that action at this time.
0 commit comments