Remove unused DirMgr::netdir method, make opt_netdir private.
This commit is contained in:
parent
c39aa5de73
commit
de460b0668
|
@ -1,2 +1,3 @@
|
|||
BREAKING: Changes to error variants.
|
||||
BREAKING: Renamed DirSkewTolerance to DirTolerance.
|
||||
BREAKING: Removed `netdir` method from DirMgr, and make `opt_netdir` private.
|
||||
|
|
|
@ -860,20 +860,10 @@ impl<R: Runtime> DirMgr<R> {
|
|||
}
|
||||
|
||||
/// Return an Arc handle to our latest directory, if we have one.
|
||||
pub fn opt_netdir(&self) -> Option<Arc<NetDir>> {
|
||||
fn opt_netdir(&self) -> Option<Arc<NetDir>> {
|
||||
self.netdir.get()
|
||||
}
|
||||
|
||||
/// Return an Arc handle to our latest directory, returning an error if there is none.
|
||||
///
|
||||
/// # Errors
|
||||
///
|
||||
/// Errors with [`Error::DirectoryNotPresent`] if the `DirMgr` hasn't been bootstrapped yet.
|
||||
// TODO: Add variants of this that make sure that it's up-to-date?
|
||||
pub fn netdir(&self) -> Result<Arc<NetDir>> {
|
||||
self.opt_netdir().ok_or(Error::DirectoryNotPresent)
|
||||
}
|
||||
|
||||
/// Return a new asynchronous stream that will receive notification
|
||||
/// whenever the consensus has changed.
|
||||
///
|
||||
|
|
Loading…
Reference in New Issue