Skip to content
  • SamwiseFilmore's avatar
    Small Error improvements; Passes tests · 48dac371
    SamwiseFilmore authored
    Everything appears to be functional. I assumed that two functions that
    were called the same thing with approximately the same contents had the
    same behavior... not a safe assumption to make. That function is now
    reimplemented, among with several other small fixes. I also added a call
    to `pkgar list` in the tests to make sure it doesn't panic or do
    something else equally dumb.
    
    I also added a dependency on UserFacingError... I'm not sure how much
    value it will add, but I can see it being more useful as pkgar matures
    and good error reporting becomes more critical. Many improvements on
    that front soon I hope.
    
    In terms of the refactoring that happened last commit: There are some
    critical issues with implementing PackageSrc as a trait, namely needing
    to call read_at (which should be considered expensive) in order to read
    the header, something that most of the functions have to do. read_at
    could conceiveably cross network boundaries in the future, so it's
    important not to call it unessesarily. More design work needs to be done
    there.
    48dac371