-
| 
         From the tutorial: Wouldn't it be better if there was a dedicated enum? enum BytesRead {
  EOF,
  Length(NonZeroUsize)
}Then the EOF case would have to be handled explicitly  | 
  
Beta Was this translation helpful? Give feedback.
      
      
          Answered by
          
            Darksonn
          
      
      
        Dec 28, 2021 
      
    
    Replies: 1 comment
-
| 
         That's certainly a reasonable way to approach it, and I'm sure it has been suggested before, but we chose to keep it as an integer to mirror the standard library traits.  | 
  
Beta Was this translation helpful? Give feedback.
                  
                    0 replies
                  
                
            
      Answer selected by
        agluszak
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment
  
        
    
That's certainly a reasonable way to approach it, and I'm sure it has been suggested before, but we chose to keep it as an integer to mirror the standard library traits.