ruff/crates/ruff_linter
Dhruv Manilawala 626b0577cd
Explicit as_str (no deref), add no allocation methods (#8826)
## Summary

This PR is a follow-up to the AST refactor which does the following:
- Remove `Deref` implementation on `StringLiteralValue` and use explicit
`as_str` calls instead. The `Deref` implementation would implicitly
perform allocations in case of implicitly concatenated strings. This is
to make sure the allocation is explicit.
- Now, certain methods can be implemented to do zero allocations which
have been implemented in this PR. They are:
    - `is_empty`
    - `len`
    - `chars`
    - Custom `PartialEq` implementation to compare each character

## Test Plan

Run the linter test suite and make sure all tests pass.
2023-11-25 00:03:59 +00:00
..
resources/test [flake8-bandit] Implement tarfile-unsafe-members (S202) (#8829) 2023-11-24 17:46:06 +00:00
src Explicit as_str (no deref), add no allocation methods (#8826) 2023-11-25 00:03:59 +00:00
Cargo.toml Bump version to v0.1.6 (#8744) 2023-11-17 13:29:19 -05:00