- 
                Notifications
    
You must be signed in to change notification settings  - Fork 1.1k
 
          fix(autonat::v2::client): DialBackError visibility
          #6168
        
          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
base: master
Are you sure you want to change the base?
Changes from 5 commits
4870f2f
              bb96556
              c017f34
              7e9d65e
              d4eb99d
              67a63e6
              a50084c
              File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change | 
|---|---|---|
| @@ -1,6 +1,6 @@ | ||
| use std::{ | ||
| collections::{HashMap, VecDeque}, | ||
| fmt::{Debug, Display, Formatter}, | ||
| fmt::Debug, | ||
| task::{Context, Poll}, | ||
| time::Duration, | ||
| }; | ||
| 
          
            
          
           | 
    @@ -239,7 +239,7 @@ where | |
| tested_addr, | ||
| bytes_sent, | ||
| server: peer_id, | ||
| result: result.map_err(|e| Error { inner: e }), | ||
| result, | ||
| })); | ||
| } | ||
| 
     | 
||
| 
          
            
          
           | 
    @@ -374,22 +374,6 @@ impl Default for Behaviour<OsRng> { | |
| } | ||
| } | ||
| 
     | 
||
| pub struct Error { | ||
| pub(crate) inner: dial_request::DialBackError, | ||
| } | ||
| 
     | 
||
| impl Display for Error { | ||
| fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result { | ||
| Display::fmt(&self.inner, f) | ||
| } | ||
| } | ||
| 
     | 
||
| impl Debug for Error { | ||
| fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result { | ||
| Debug::fmt(&self.inner, f) | ||
| } | ||
| } | ||
| 
         
      Comment on lines
    
      -377
     to 
      -391
    
   
  There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Wouldnt it be better to leave this in place but implement  There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I honestly gave that a small thought initially. I definitely like the second approach more. But I fail to identify a benefit from that layer of indirection, so came with this approach; do you have some on your mind? Like IIRC the idea of  There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yup, I agree with Darius I don't think this needs to be a breaking change, we can probably implement  There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @jxs There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. As  Tbh, I'd rather see here   | 
||
| 
     | 
||
| #[derive(Debug)] | ||
| pub struct Event { | ||
| /// The address that was selected for testing. | ||
| 
        
          
        
         | 
    @@ -402,7 +386,7 @@ pub struct Event { | |
| pub server: PeerId, | ||
| /// The result of the test. If the test was successful, this is `Ok(())`. | ||
| /// Otherwise it's an error. | ||
| pub result: Result<(), Error>, | ||
| pub result: Result<(), dial_request::DialBackError>, | ||
| } | ||
| 
     | 
||
| struct ConnectionInfo { | ||
| 
          
            
          
           | 
    ||
Uh oh!
There was an error while loading. Please reload this page.