Commit 4acf3441 authored by Sven Liefgen's avatar Sven Liefgen
Browse files

Fix doctests

parent e032b4b2
Pipeline #4752 passed with stages
in 3 minutes and 16 seconds
......@@ -351,7 +351,7 @@ impl<C: 'static + Coder> BoundSocket<C> {
/// # let mtu = Information::new::<byte>(1_500);
/// # let target = Duration::from_secs(1);
/// let socket = Socket::<VdmCoder>::new(mtu, target);
/// let mut socket = socket.bind("0.0.0.0:5000");
/// let mut socket = socket.bind("0.0.0.0:5000").unwrap();
/// let result = socket.connect("127.0.0.1:1234");
///
/// assert!(result.is_ok());
......@@ -365,7 +365,7 @@ impl<C: 'static + Coder> BoundSocket<C> {
/// # let mtu = Information::new::<byte>(1_500);
/// # let target = Duration::from_secs(1);
/// let socket = Socket::<VdmCoder>::new(mtu, target);
/// let mut socket = socket.bind("0.0.0.0:5000");
/// let mut socket = socket.bind("0.0.0.0:5000").unwrap();
/// let result = socket.connect("invalid:1234");
///
/// assert!(result.is_err());
......@@ -384,11 +384,11 @@ impl<C: 'static + Coder> BoundSocket<C> {
/// SocketAddr::from(([0, 0, 0, 0], 5000)),
/// SocketAddr::from(([127, 0, 0, 1], 6000)),
/// ];
/// let mut socket = socket.bind("0.0.0.0:5000");
/// let mut socket = socket.bind("0.0.0.0:5000").unwrap();
/// let result = socket.connect(&addresses[..]);
///
/// assert!(result.is_ok());
/// assert_eq!(socket.unwrap().remote_port(), 5000);
/// assert_eq!(socket.remote_port(), 5000);
/// ````
///
/// # Errors
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment