Re:Rust is for Professionals
by devit on Tuesday April 13, 2021 @01:20PM
(#26795724)
The latter change introduces an unnecessary clone(). The correct approach is to instead introduce a variable so that headerRegex can keep being a reference to either that variable or to HEADER_REGEX.
[ Parent
| on HN ]
Can you expand on how this stops a clone from happening?
If you don't call clone() then a clone doesn't happen...