title: How do I deal with "Ambiguous reference to member '=='" in RxBluetoothKit?
body: <p>Trying to scan for <code>Bluetooth</code> <code>peripherals</code> using <code>RxBluetoothKit</code> I get an <code>error</code> called </p>
  
  <blockquote>
    <p>"Ambiguous reference to member '=='
    using this code:</p>
  </blockquote>
  
  <pre><code>func observeState() -&gt; Observable&lt;[BluetoothState]&gt; {
      return manager.observeState()
             .startWith(manager.state)
             .do(onNext: { print("CHECK POWER", $0) })
             .filter{ $0 == .poweredOn }
             .take(1)
             .do(onNext:{
                 print("POWERED ON", $0)
             })
             .flatMap { _ in
                 self.manager
                     .scanForPeripherals(withServices: nil)
                     .map { BlePeripheral(peripheral: $0.peripheral) }
                     .do(onNext: {
                         print($0.peripheral.name)
                         print($0.peripheral.identifier)
                         print($0.peripheral.connected)
                      })
             }
      }
  </code></pre>
  
  <p>The error is on <code>.filter{ $0 == .poweredOn }</code></p>
  
  <p>If I remove everything from <code>flatMap</code> and onwards, the error disappear but obviously I need to have that part at some point. Not sure I understand the <code>error</code>. I have looked at question/answers on the same error but I'm still not sure how it applies to my case or what the <code>compiler</code> wants me to do. Appreciate any pointers to how to fix this.</p>