Skip to content

Remove R: Read bounds on structs #88

Closed
@dtolnay

Description

@dtolnay

None of the R: Read bounds are required. This includes the following types:

  • deflate::EncoderReader
  • deflate::EncoderReaderBuf
  • deflate::DecoderReader
  • deflate::DecoderReaderBuf
  • gz::EncoderReader
  • gz::EncoderReaderBuf
  • gz::DecoderReader
  • gz::MultiDecoderReader
  • gz::DecoderReaderBuf
  • gz::MultiDecoderReaderBuf

All of these need R: Read bounds on various impls but not on the structs themselves. Having bounds on the structs is annoying because the bounds transitively infect any structs containing any of these types.

The W: Write bounds in contrast are all required because those types have Drop impls that require the bound. Rust currently requires any bound on a Drop implementation to also be present on the struct.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions