Browse Source

InteroperabilityTestsCLI: Avoid conformance error (#518)

fabstu 6 years ago
parent
commit
b5a37330d8
1 changed files with 0 additions and 24 deletions
  1. 0 24
      Sources/GRPCInteroperabilityTestsCLI/main.swift

+ 0 - 24
Sources/GRPCInteroperabilityTestsCLI/main.swift

@@ -79,30 +79,6 @@ func exitOnThrow<T>(block: () throws -> T) -> T {
   }
 }
 
-// MARK: - Optional extensions for Commander
-
-// "Commander" doesn't allow us to have no value for an `Option` and using a sentinel value to
-// indicate a lack of value isn't very Swift-y when we have `Optional`.
-
-extension Optional: CustomStringConvertible where Wrapped: ArgumentConvertible {
-  public var description: String {
-    guard let value = self else {
-      return "None"
-    }
-    return "Some(\(value))"
-  }
-}
-
-extension Optional: ArgumentConvertible where Wrapped: ArgumentConvertible {
-  public init(parser: ArgumentParser) throws {
-    if let wrapped = parser.shift() as? Wrapped {
-      self = wrapped
-    } else {
-      self = .none
-    }
-  }
-}
-
 // MARK: - Command line options and "main".
 
 let serverHostOption = Option(