засунуть в Arc<Mutex<Connection>>?
redis::Connection doesn't implement std::fmt::Debug
redis::Connection cannot be formatted using {:?} because it doesn't implement std::fmt::Debug
help: the trait std::fmt::Debug is not implemented for redis::Connection
note: required because of the requirements on the impl of std::fmt::Debug for std::sync::Mutex<redis::Connection>
note: required because of the requirements on the impl of std::fmt::Debug for std::sync::Arc<std::sync::Mutex<redis::Connection>>
note: required because of the requirements on the impl of std::fmt::Debug for &std::sync::Arc<std::sync::Mutex<redis::Connection>>
note: required for the cast to the object type dyn std::fmt::Debug
Хм, Debug вообще отношения не имеет к передаче между тредами. Это трейт форматирования.
Обсуждают сегодня