You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When very briefly wandering around this project, attracted by @y-young, I see a very very tiny issue, and just post it here as a small practice to Rust:
Is u16 more efficient than &u16 when passing an argument?
If the user of this method do not need path/src_ip anymore, currently the add_path still makes a copy of it. If we change the signature to path: String and remove to_owned(), maybe we can remove a memory copy in such case.
The text was updated successfully, but these errors were encountered:
fzyzcjy
changed the title
Very tiny suggestion
Very tiny suggestion about Rust grammar
Jun 28, 2022
@y-young
When very briefly wandering around this project, attracted by @y-young, I see a very very tiny issue, and just post it here as a small practice to Rust:
rMiniK8s/controllers/src/ingress/nginx_ingress_config.rs
Line 101 in 35b2c30
I am not sure about the following:
&str
better than&String
?u16
more efficient than&u16
when passing an argument?path
/src_ip
anymore, currently theadd_path
still makes a copy of it. If we change the signature topath: String
and removeto_owned()
, maybe we can remove a memory copy in such case.The text was updated successfully, but these errors were encountered: