@@ -68,7 +68,7 @@ class KeyChain {
6868
6969 td::Result<api::PrivateKeyId> generate_dummy_key () {
7070 auto hash = to_hash (" dummy key" , " ..." );
71- return container_.try_build <Key>(hash, [& ]() -> td::Result<PrivateKeyWithMnemonic> {
71+ return container_.try_build <Key>(hash, []() -> td::Result<PrivateKeyWithMnemonic> {
7272 td::SecureString key (32 , 1 );
7373 return PrivateKeyWithMnemonic::from_private_key (PrivateKey::from_slice (key).move_as_ok (), {});
7474 });
@@ -295,7 +295,7 @@ class KeyChain {
295295
296296 td::Result<api::SymmetricKeyId> handshake_get_shared_key_id (api::HandshakeId handshake_id) {
297297 TRY_RESULT (handshake, container_.get_unique <Handshake>(handshake_id));
298- TRY_RESULT (shared_secret, std::visit ([& ](auto &&v) { return v.shared_secret (); }, *handshake));
298+ TRY_RESULT (shared_secret, std::visit ([](auto &&v) { return v.shared_secret (); }, *handshake));
299299 auto hash = to_hash (" handshake shared_secret" , shared_secret.as_slice ());
300300 return container_.try_build <Key>(hash, [&]() -> td::Result<td::SecureString> { return std::move (shared_secret); });
301301 }
@@ -559,8 +559,8 @@ class KeyChain {
559559 td::Result<PublicKey> to_public_key (api::AnyKeyId key_id) const {
560560 TRY_RESULT (key, container_.get_shared <Key>(key_id));
561561 return std::visit (
562- td::overloaded ([& ](const PrivateKeyWithMnemonic &pk) -> td::Result<PublicKey> { return pk.to_public_key (); },
563- [& ](const PublicKey &pk) -> td::Result<PublicKey> { return pk; },
562+ td::overloaded ([](const PrivateKeyWithMnemonic &pk) -> td::Result<PublicKey> { return pk.to_public_key (); },
563+ [](const PublicKey &pk) -> td::Result<PublicKey> { return pk; },
564564 [](const auto &) -> td::Result<PublicKey> {
565565 return td::Status::Error (static_cast <int >(api::ErrorCode::InvalidInput),
566566 " key_id doesn't contain public key" );
0 commit comments