Senior Rust Developer
Budget: $10 – $30 USD
Please have a look at this piece of code:
pub fn process_str(str_data: &String) {
// Process string by iterating over its elements
...
}
1. What’s wrong with it?
2. What can be improved with regard to the API usability (we want to support different types of
strings)?
3. In addition to above - we want to avoid unnecessary allocations. Please explain your solution[s].
pub fn process_str(str_data: &String) {
// Process string by iterating over its elements
...
}
1. What’s wrong with it?
2. What can be improved with regard to the API usability (we want to support different types of
strings)?
3. In addition to above - we want to avoid unnecessary allocations. Please explain your solution[s].