hs: in NetDir, wrap HsDirs in an Arc<>.
Once the HsDirs
has been constructed for a given NetDir
, it will never change. But while we are filling in a NetDir
, we sometimes need to Clone
the NetDir
in order to add new information to the 'official' copy while other instances of the NetDir
are in use. (See use of Arc::make_mut
in dirmgr.)
To this end, we try to keep the immutable data in NetDir
behind an Arc, so that Clone can be as shallow a copy as possible. Therefore, it makes sens to stick the HsDirs
in an Arc.
@Diziet if you agree with the reasoning here I can do the patch.