wahn / rs_pbrt

Rust crate to implement a counterpart to the PBRT book's (3rd edition) C++ code. See also https://www.rs-pbrt.org/about ...

Home Page:https://www.rs-pbrt.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Make ParamSet::find_xxx() take the name as a &str

abusch opened this issue · comments

I noticed that the ParamSet::find_xxx() methods take the name argument as a String. I think it should be a &str instead as most of the time we pass in a string literal. This would make its use more ergonomic, and avoid lots of unnecessary allocations.

Excellent. Sounds good to me.