ruff/crates
Charlie Marsh 3af9dfeb0a
Rewrite `suspicious_function_call` as a match statement (#5140)
## Summary

@konstin mentioned that in profiling, this function accounted for a
non-trivial amount of time (0.33% of total execution, the most of any
rule). This PR attempts to rewrite it as a match statement for better
performance over a looping comparison.

## Test Plan

`cargo test`
2023-06-16 08:57:20 -04:00
..
flake8_to_ruff Use consistent `Cargo.toml` metadata in all crates (#5015) 2023-06-12 00:02:40 +00:00
ruff Rewrite `suspicious_function_call` as a match statement (#5140) 2023-06-16 08:57:20 -04:00
ruff_benchmark Use consistent `Cargo.toml` metadata in all crates (#5015) 2023-06-12 00:02:40 +00:00
ruff_cache Run `rustfmt` on nightly to clean up erroneous comments (#5106) 2023-06-15 00:19:05 +00:00
ruff_cli Remove `FixMode::None` (#5087) 2023-06-14 11:17:09 -04:00
ruff_dev Add roundtrip support for Jupyter notebook (#5028) 2023-06-12 23:27:45 +05:30
ruff_diagnostics Use consistent `Cargo.toml` metadata in all crates (#5015) 2023-06-12 00:02:40 +00:00
ruff_formatter Run `rustfmt` on nightly to clean up erroneous comments (#5106) 2023-06-15 00:19:05 +00:00
ruff_index Run `rustfmt` on nightly to clean up erroneous comments (#5106) 2023-06-15 00:19:05 +00:00
ruff_macros Use consistent `Cargo.toml` metadata in all crates (#5015) 2023-06-12 00:02:40 +00:00
ruff_python_ast Use `matches!` for insecure hash rule (#5141) 2023-06-16 04:18:32 +00:00
ruff_python_formatter Always use identifier ranges to store bindings (#5110) 2023-06-15 18:43:19 +00:00
ruff_python_semantic Use const-singleton helpers in more rules (#5142) 2023-06-16 04:28:35 +00:00
ruff_python_stdlib Use consistent `Cargo.toml` metadata in all crates (#5015) 2023-06-12 00:02:40 +00:00
ruff_python_whitespace Use consistent `Cargo.toml` metadata in all crates (#5015) 2023-06-12 00:02:40 +00:00
ruff_rustpython Use consistent `Cargo.toml` metadata in all crates (#5015) 2023-06-12 00:02:40 +00:00
ruff_testing_macros Use consistent `Cargo.toml` metadata in all crates (#5015) 2023-06-12 00:02:40 +00:00
ruff_textwrap Use consistent `Cargo.toml` metadata in all crates (#5015) 2023-06-12 00:02:40 +00:00
ruff_wasm Add support for auto-fix in Jupyter notebooks (#4665) 2023-06-12 14:14:15 +00:00