Migrate to absl::AnyInvocable in NP.

Replaces a bunch of std::function uses with absl::AnyInvocable.

PiperOrigin-RevId: 502960326
This commit is contained in:
Janusz Sobczak
2023-01-18 13:16:29 -08:00
committed by Copybara-Service
parent 9a22f71a54
commit a29be214a3
19 changed files with 116 additions and 139 deletions
@@ -67,7 +67,7 @@ TEST(BleV2Medium, DISABLED_StartScanning) {
};
EXPECT_TRUE(blev2_medium.StartScanning(
service_uuid, api::ble_v2::TxPowerLevel::kHigh, callback));
service_uuid, api::ble_v2::TxPowerLevel::kHigh, std::move(callback)));
EXPECT_TRUE(scan_response_notification.WaitForNotificationWithTimeout(
absl::Seconds(5)));
@@ -85,7 +85,7 @@ TEST(BleV2Medium, DISABLED_StopScanning) {
const api::ble_v2::BleAdvertisementData& advertisement_data) {};
EXPECT_TRUE(blev2_medium.StartScanning(
service_uuid, api::ble_v2::TxPowerLevel::kHigh, callback));
service_uuid, api::ble_v2::TxPowerLevel::kHigh, std::move(callback)));
EXPECT_TRUE(blev2_medium.StopScanning());
}