Delete tor_dirmgr::Error::BadNetworkConfig

This was anomalous, in that it contains &'static str, rather than a
proper nested error (eg a config::ConfigError, maybe).

But in fact it tursn out it is now not constructed.  The last
construction site was removed a long time ago in
  Use derive_builder for Authority and FallbackDir.
This commit is contained in:
Ian Jackson 2022-05-12 16:49:06 +01:00
parent 5990df53fe
commit d847d49858
2 changed files with 1 additions and 5 deletions

View File

@ -30,9 +30,6 @@ pub enum Error {
/// A schema version that says we can't read it.
#[error("unrecognized data storage schema")]
UnrecognizedSchema,
/// We couldn't configure the network.
#[error("bad network configuration")]
BadNetworkConfig(&'static str),
/// User requested an operation that required a usable
/// bootstrapped directory, but we didn't have one.
#[error("directory not present or not up-to-date")]
@ -163,7 +160,6 @@ impl Error {
| Error::CachePermissions(_)
| Error::SqliteError(_)
| Error::UnrecognizedSchema
| Error::BadNetworkConfig(_)
| Error::DirectoryNotPresent
| Error::ManagerDropped
| Error::CantAdvanceState
@ -226,7 +222,6 @@ impl HasKind for Error {
}
E::SqliteError(e) => sqlite_error_kind(e),
E::UnrecognizedSchema => EK::CacheCorrupted,
E::BadNetworkConfig(_) => EK::InvalidConfig,
E::DirectoryNotPresent => EK::DirectoryExpired,
E::NetDirOlder => EK::TorDirectoryError,
E::BadUtf8FromDirectory(_) => EK::TorProtocolViolation,

View File

@ -30,6 +30,7 @@ MODIFIED: New APIs for CachedDir, Error.
### tor-dirmgr
BREAKING: Added new cache_trust element to DirMgrConfig.
BREAKING: Delete Error::BadNetworkConfig
### tor-netdoc