[PR #1138] Remove redundant stream field in AsyncOnlyStream #1573

Open
opened 2026-01-29 22:21:12 +00:00 by claunia · 0 comments
Owner

Original Pull Request: https://github.com/adamhathcock/sharpcompress/pull/1138

State: closed
Merged: Yes


AsyncOnlyStream was storing the wrapped stream in both a private _stream field and the base class's Stream property, creating maintenance issues and unnecessary redundancy.

Changes

  • Removed _stream field - use inherited Stream property from SharpCompressStream
  • Simplified Dispose() to delegate to base class (already handles stream disposal)

This eliminates dual ownership while maintaining identical behavior.


Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

**Original Pull Request:** https://github.com/adamhathcock/sharpcompress/pull/1138 **State:** closed **Merged:** Yes --- `AsyncOnlyStream` was storing the wrapped stream in both a private `_stream` field and the base class's `Stream` property, creating maintenance issues and unnecessary redundancy. ## Changes - Removed `_stream` field - use inherited `Stream` property from `SharpCompressStream` - Simplified `Dispose()` to delegate to base class (already handles stream disposal) This eliminates dual ownership while maintaining identical behavior. <!-- START COPILOT CODING AGENT TIPS --> --- ✨ Let Copilot coding agent [set things up for you](https://github.com/adamhathcock/sharpcompress/issues/new?title=✨+Set+up+Copilot+instructions&body=Configure%20instructions%20for%20this%20repository%20as%20documented%20in%20%5BBest%20practices%20for%20Copilot%20coding%20agent%20in%20your%20repository%5D%28https://gh.io/copilot-coding-agent-tips%29%2E%0A%0A%3COnboard%20this%20repo%3E&assignees=copilot) — coding agent works faster and does higher quality work when set up for your repo.
claunia added the pull-request label 2026-01-29 22:21:12 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/sharpcompress#1573