rspec/rules/S107/rust/split-example.adoc
github-actions[bot] 164b14aedc
Create rule S107: Functions should not have too many parameters (#4699)
* Add rust to rule S107

* Update RSPEC

* Remove tag

---------

Co-authored-by: yassin-kammoun-sonarsource <yassin-kammoun-sonarsource@users.noreply.github.com>
Co-authored-by: yassin-kammoun-sonarsource <yassin.kammoun@sonarsource.com>
Co-authored-by: Yassin Kammoun <52890329+yassin-kammoun-sonarsource@users.noreply.github.com>
2025-03-19 14:54:18 +00:00

12 lines
256 B
Plaintext

[source,rust]
----
// Each function does a part of what the original setCoordinates function was doing, so confusion risks are lower
fn set_origin(x: i32, y: i32, z: i32) {
// ...
}
fn set_size(width: i32, height: i32, depth: i32) {
// ...
}
----