fxbox / deprecated-taxonomy

This repository has moved.
https://github.com/fxbox/foxbox/
Mozilla Public License 2.0
0 stars 9 forks source link

Derive a Clone implementation for the manager #58

Closed julienw closed 8 years ago

julienw commented 8 years ago

Do I need a unit test @ferjm ?

Yoric commented 8 years ago

@julienw What's the use of this Clone implementation? All code that uses the manager now uses an Arc<AdapterManager>.

julienw commented 8 years ago

Well, it's not really needed to use another Arc to use it, right ? Because AdapterManager itself contains only Arcs...

basically my init file doesn't take a Arc but takes a &AdapterManager, and I want to clone it. It felt better. But I have no religion so I can change it.

Yoric commented 8 years ago

I'd rather you did the same as the other Adapters (hum, as of yesterday :) ), and took an &Arc<AdapterManager>. It doesn't require as much knowledge of how the AdapterManager works, so it will let us change its behavior later if needs be.

julienw commented 8 years ago

With this patch I wouldn't need any knowledge, I would just need to force "+ Clone" in my where line to have the knowledge ;)

Anyway, as I said, I have no religion here. I'll change my code.