- 
                Notifications
    You must be signed in to change notification settings 
- Fork 13.9k
          Rewrite std::net::ToSocketAddrs doc examples.
          #44117
        
          New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
  
    Rewrite std::net::ToSocketAddrs doc examples.
  
  #44117
              Conversation
| r? @sfackler (rust_highfive has picked a reviewer for you, use r? to override) | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hit a few travis errors
        
          
                src/libstd/net/addr.rs
              
                Outdated
          
        
      There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like there's not an impl for ((u8, u8, u8, u8), u16)? Maybe you still need a Ipv4Addr::new?
        
          
                src/libstd/net/addr.rs
              
                Outdated
          
        
      There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
missing a close paren
        
          
                src/libstd/net/addr.rs
              
                Outdated
          
        
      There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this actually appears to have successfully called to_socket_addrs o_O
called `Result::unwrap_err()` on an `Ok` value: IntoIter([V4(127.0.0.0:80)])
        
          
                src/libstd/net/addr.rs
              
                Outdated
          
        
      There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is setting this to no_run the right call? Especially if it actually resolved an address in the last run? If we want to show an example of it not resolving the address, we could just leave off the port; that will cause a failure.
        
          
                src/libstd/net/addr.rs
              
                Outdated
          
        
      There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
missing close paren, this is the travis failure
| tests pass now. i'll squash whenever this gets approved | 
| Looks good! Go ahead and squash and r=me. | 
in particular: * show how to create an iterator that yields multiple socket addresses * show more failing scenarios
043382c    to
    10bd39e      
    Compare
  
    | @bors r=QuietMisdreavus rollup | 
| 📌 Commit 10bd39e has been approved by  | 
…xamples, r=QuietMisdreavus Rewrite `std::net::ToSocketAddrs` doc examples. in particular: * show how to create an iterator that yields multiple socket addresses * show more failing scenarios done this as preliminary work while investigating rust-lang#22569 note: i haven't run doc tests on my machine for this, so would be good to confirm CI passes before approving
…xamples, r=QuietMisdreavus Rewrite `std::net::ToSocketAddrs` doc examples. in particular: * show how to create an iterator that yields multiple socket addresses * show more failing scenarios done this as preliminary work while investigating rust-lang#22569 note: i haven't run doc tests on my machine for this, so would be good to confirm CI passes before approving
…xamples, r=QuietMisdreavus Rewrite `std::net::ToSocketAddrs` doc examples. in particular: * show how to create an iterator that yields multiple socket addresses * show more failing scenarios done this as preliminary work while investigating rust-lang#22569 note: i haven't run doc tests on my machine for this, so would be good to confirm CI passes before approving
…xamples, r=QuietMisdreavus Rewrite `std::net::ToSocketAddrs` doc examples. in particular: * show how to create an iterator that yields multiple socket addresses * show more failing scenarios done this as preliminary work while investigating rust-lang#22569 note: i haven't run doc tests on my machine for this, so would be good to confirm CI passes before approving
…xamples, r=QuietMisdreavus Rewrite `std::net::ToSocketAddrs` doc examples. in particular: * show how to create an iterator that yields multiple socket addresses * show more failing scenarios done this as preliminary work while investigating rust-lang#22569 note: i haven't run doc tests on my machine for this, so would be good to confirm CI passes before approving
…xamples, r=QuietMisdreavus Rewrite `std::net::ToSocketAddrs` doc examples. in particular: * show how to create an iterator that yields multiple socket addresses * show more failing scenarios done this as preliminary work while investigating rust-lang#22569 note: i haven't run doc tests on my machine for this, so would be good to confirm CI passes before approving
in particular:
done this as preliminary work while investigating #22569
note: i haven't run doc tests on my machine for this, so would be good to confirm CI passes before approving