Skip to content

Conversation

@chessbyte
Copy link
Contributor

Issue # (if available)

Description of changes

Replace res_bytes.as_slice() with idiomatic &res_bytes[..] to avoid name collision with new [T]::as_slice() method added in Rust nightly (rust-lang/rust#145933, merged 2025-12-18).

Issue observed in nightly build checks for PR #1293.

The WriteBuf trait from zstd was only imported to provide as_slice() through its impl for [u8], which is unnecessary coupling. Using slice syntax is more idiomatic and doesn't require external trait imports.

Checklist

  • Created unit tests in tests/unit and/or in Rust for my feature if needed
  • Ran make fix to format JS and apply Clippy auto fixes
  • Made sure my code didn't add any additional warnings: make check
  • Added relevant type info in types/ directory
  • Updated documentation if needed (API.md/README.md/Other)

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Replace res_bytes.as_slice() with idiomatic &res_bytes[..] to avoid
name collision with new [T]::as_slice() method added in Rust nightly
(rust-lang/rust#145933, merged 2025-12-18).

Issue observed in nightly build checks for PR awslabs#1293.

The WriteBuf trait from zstd was only imported to provide as_slice()
through its impl for [u8], which is unnecessary coupling. Using slice
syntax is more idiomatic and doesn't require external trait imports.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant