[PR #1138] [MERGED] Remove redundant stream field in AsyncOnlyStream #1570

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

📋 Pull Request Information

Original PR: https://github.com/adamhathcock/sharpcompress/pull/1138
Author: @Copilot
Created: 1/16/2026
Status: Merged
Merged: 1/16/2026
Merged by: @adamhathcock

Base: adam/async-creationHead: copilot/sub-pr-1132


📝 Commits (2)

  • bbbbc88 Initial plan
  • 2012077 Remove redundant _stream field from AsyncOnlyStream and use base Stream property

📊 Changes

1 file changed (+13 additions, -20 deletions)

View changed files

📝 tests/SharpCompress.Test/Mocks/AsyncOnlyStream.cs (+13 -20)

📄 Description

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.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/adamhathcock/sharpcompress/pull/1138 **Author:** [@Copilot](https://github.com/apps/copilot-swe-agent) **Created:** 1/16/2026 **Status:** ✅ Merged **Merged:** 1/16/2026 **Merged by:** [@adamhathcock](https://github.com/adamhathcock) **Base:** `adam/async-creation` ← **Head:** `copilot/sub-pr-1132` --- ### 📝 Commits (2) - [`bbbbc88`](https://github.com/adamhathcock/sharpcompress/commit/bbbbc8810a2ae4c9426e18c837a9c51be628e059) Initial plan - [`2012077`](https://github.com/adamhathcock/sharpcompress/commit/2012077fb02588139bd0d4a61a9882a4b312663f) Remove redundant _stream field from AsyncOnlyStream and use base Stream property ### 📊 Changes **1 file changed** (+13 additions, -20 deletions) <details> <summary>View changed files</summary> 📝 `tests/SharpCompress.Test/Mocks/AsyncOnlyStream.cs` (+13 -20) </details> ### 📄 Description `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. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
claunia added the pull-request label 2026-01-29 22:21:11 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/sharpcompress#1570