Remove unused WriterTo interface constraint from rarReader type#56
Remove unused WriterTo interface constraint from rarReader type#56mholt merged 1 commit intomholt:mainfrom
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR fixes a compilation error by removing the unused io.WriterTo interface constraint from the rarReader type definition to maintain compatibility with the updated rardecode v2.2.0 library.
- Removed the unused
io.WriterTomethod requirement from therarReaderinterface - Updated the
rardecodedependency from v2.1.1 to v2.2.0
Reviewed Changes
Copilot reviewed 2 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| rar.go | Removed io.WriterTo from rarReader interface to fix compilation error |
| go.mod | Updated rardecode dependency to v2.2.0 |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
|
Apologies in advance for the copilot auto review. Not sure why I don't have the option to disable that for external repos! |
|
Are we sure about this? My understanding is many of underlying |
|
The rardecode package doesn't implement WriterTo is the issue It only decodes rar format, it does not write it |
|
Oh -- duh, you are right. 🤦♂️ Not sure how I totally forgot that our RAR is read-only. |
Issue
The
rardecodev2.2.0 library removed theWriterTomethod from itsReaderandReadClosertypes, causingcompilation failures:
Solution
Removed
io.WriterTofrom therarReaderinterface definition since it was never actually used in the archives codebase.The interface now only requires
Next()andio.Reader, which are the methods actually utilized by the RARextraction implementation.