title: Swift Cannot convert value of type CBPeripheral to expected argument type
body: <p>The code I have:</p>
  
  <pre><code>func didDiscoverBLE(_ peripheral: CBPeripheral!, address: String!, rssi: Int32) {
  
  
  DispatchQueue.main.async(execute: {() -&gt; Void in
  
                      // Handle Discovery
                      self.arrayPeripehral.contains(where:peripheral)
                          return
                      })
              self.arrayPeripehral.append(peripheral)
              let title: String = "\(peripheral.name) \(address) (RSSI:\(rssi))"
              self.arrayPeripheralName.append(title)
  </code></pre>
  
  <hr>
  
  <p>In this line i have a problem:</p>
  
  <pre><code>self.arrayPeripehral.contains(where:peripheral)
      return
  })
  </code></pre>
  
  <p>Has anyone an idea?</p>
  
  <hr>
  
  <p>Here is the code I copied from the obective c to the swift and got stuck on this error</p>
  
  <pre><code> - (void)didDiscoverBLE:(CBPeripheral *)peripheral address:(NSString *)address rssi:(int)rssi
      {
          dispatch_async(dispatch_get_main_queue(), ^{
  
              // Handle Discovery
              if([arrayPeripehral containsObject:peripheral])
                  return;
  
              [arrayPeripehral addObject:peripheral];
  
              NSString * title = [NSString stringWithFormat:@"%@ %@ (RSSI:%d)", peripheral.name, address, rssi];
  
              [arrayPeripheralName addObject:title];
  </code></pre>