Loading crates/tor-dirmgr/semver.md +1 −0 Original line number Diff line number Diff line BREAKING: Changes to error variants. BREAKING: Renamed DirSkewTolerance to DirTolerance. BREAKING: Removed `netdir` method from DirMgr, and make `opt_netdir` private. crates/tor-dirmgr/src/lib.rs +1 −11 Original line number Diff line number Diff line Loading @@ -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 Loading
crates/tor-dirmgr/semver.md +1 −0 Original line number Diff line number Diff line BREAKING: Changes to error variants. BREAKING: Renamed DirSkewTolerance to DirTolerance. BREAKING: Removed `netdir` method from DirMgr, and make `opt_netdir` private.
crates/tor-dirmgr/src/lib.rs +1 −11 Original line number Diff line number Diff line Loading @@ -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