Rust

Rust

Made by DeepSource

Found occurrence of Arc<Box<T>> RS-W1057

Anti-pattern
Minor

The Arc<Box<T>> type is redundant because an Arc is already a type that allocates memory on the heap and manages its ownership, so wrapping it in a Box provides no additional benefits.

Consider using just Arc<T>.

Bad practice

let v: Arc<Box<str>> = Arc::new(Box::from("str")); // readable across threads

Recommended

let v: Arc<str> = Arc::from("str"); // readable across threads