Refactor component.rs rename() #147
Replies: 3 comments
-
I guess the point of taking mut is to partly avoid applying the rename more than once, and avoiding taking something by reference by taking it by value from the option? Also with more operations than just rename to come in |
Beta Was this translation helpful? Give feedback.
-
I put some proposed documentation updates in this draft PR https://github.com/juhaku/utoipa/pull/146/files#diff-c2c506c1d61101323c309d3947b6328198fda433dd1be11232fab56d74345b02R762 |
Beta Was this translation helpful? Give feedback.
-
Yeah, it indeed is not the easiest function to reason about, and perhaps could be improved a bit. |
Beta Was this translation helpful? Give feedback.
-
Hi @juhaku I was attempting to write a documentation comment for
rename()
utoipa/utoipa-gen/src/schema/component.rs
Lines 720 to 734 in a1c49de
mut
parameters, and make it easier to reason about what's going in/out in a functional style?Beta Was this translation helpful? Give feedback.
All reactions