|
|
|
|
|
by cornstalks
2164 days ago
|
|
> `as` is not considered idiomatic in Rust code Yes it is. It's used all the time. There's a reason as_conversions defaults to Allow in clippy. Of course, there are lots of situations where `as` is the wrong tool for the job, but I think it's a bit of a stretch to call `as` "not idiomatic". It's perfectly idiomatic in lots of situations. Whether or not it should be idiomatic is a separate question. |
|
IOW, is it currently unidiomatic? No, code reviewers won't generally look sideways at it. But it's certainly getting less idiomatic over time, and that trend doesn't seem likely to stop soon.