Rc<&str>
RS-W1063Rc<&str>
is a pointer to a pointer.
This adds another level of indirection without any benefit whatsoever.
If the intention is to place a str
on the heap, consider using Rc<str>
.
fn get_rc_str() -> Rc<&'static str> {
Rc::from("string")
}
fn get_rc_str() -> Rc<str> {
Rc::from("string")
}