Skip to content

Commit 6a85ac7

Browse files
authored
outbound: Remove unused error type (#648)
The DiscoveryError type is unused. Remove it.
1 parent b89f58c commit 6a85ac7

File tree

1 file changed

+0
-31
lines changed
  • linkerd/app/outbound/src

1 file changed

+0
-31
lines changed

linkerd/app/outbound/src/lib.rs

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -526,37 +526,6 @@ pub fn trace_labels() -> HashMap<String, String> {
526526
l
527527
}
528528

529-
#[derive(Clone, Debug)]
530-
enum DiscoveryError {
531-
DiscoveryRejected,
532-
Inner(String),
533-
}
534-
535-
impl std::fmt::Display for DiscoveryError {
536-
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
537-
match self {
538-
DiscoveryError::DiscoveryRejected => write!(f, "discovery rejected"),
539-
DiscoveryError::Inner(e) => e.fmt(f),
540-
}
541-
}
542-
}
543-
544-
impl std::error::Error for DiscoveryError {}
545-
546-
impl From<Error> for DiscoveryError {
547-
fn from(orig: Error) -> Self {
548-
if let Some(inner) = orig.downcast_ref::<DiscoveryError>() {
549-
return inner.clone();
550-
}
551-
552-
if orig.is::<DiscoveryRejected>() || orig.is::<profiles::InvalidProfileAddr>() {
553-
return DiscoveryError::DiscoveryRejected;
554-
}
555-
556-
DiscoveryError::Inner(orig.to_string())
557-
}
558-
}
559-
560529
fn is_discovery_rejected(err: &Error) -> bool {
561530
fn is_rejected(err: &(dyn std::error::Error + 'static)) -> bool {
562531
err.is::<DiscoveryRejected>()

0 commit comments

Comments
 (0)