diff --git a/ydb/core/grpc_services/base/base.h b/ydb/core/grpc_services/base/base.h index 728e7531a3c5..855c41a4d6c2 100644 --- a/ydb/core/grpc_services/base/base.h +++ b/ydb/core/grpc_services/base/base.h @@ -696,38 +696,34 @@ class TRefreshTokenImpl NYql::TIssueManager IssueManager_; }; -namespace { - - inline TMaybe ToMaybe(const TVector& vec) { - if (vec.empty()) { - return {}; - } - return TString{vec[0]}; - } - - inline const TMaybe ExtractYdbToken(const TVector& authHeadValues) { - if (authHeadValues.empty()) { - return {}; - } - return TString{authHeadValues[0]}; +inline TMaybe ToMaybe(const TVector& vec) { + if (vec.empty()) { + return {}; } + return TString{vec[0]}; +} - inline const TMaybe ExtractDatabaseName(const TVector& dbHeaderValues) { - if (dbHeaderValues.empty()) { - return {}; - } - return CGIUnescapeRet(dbHeaderValues[0]); +inline const TMaybe ExtractYdbToken(const TVector& authHeadValues) { + if (authHeadValues.empty()) { + return {}; } + return TString{authHeadValues[0]}; +} - inline TString MakeAuthError(const TString& in, NYql::TIssueManager& issues) { - TStringStream out; - out << "unauthenticated" - << (in ? ", " : "") << in - << (issues.GetIssues() ? ": " : ""); - issues.GetIssues().PrintTo(out, true /* one line */); - return out.Str(); +inline const TMaybe ExtractDatabaseName(const TVector& dbHeaderValues) { + if (dbHeaderValues.empty()) { + return {}; } + return CGIUnescapeRet(dbHeaderValues[0]); +} +inline TString MakeAuthError(const TString& in, NYql::TIssueManager& issues) { + TStringStream out; + out << "unauthenticated" + << (in ? ", " : "") << in + << (issues.GetIssues() ? ": " : ""); + issues.GetIssues().PrintTo(out, true /* one line */); + return out.Str(); } template