diff options
author | clang-format-7.0.1 <adam.martin@10gen.com> | 2019-07-26 18:20:35 -0400 |
---|---|---|
committer | ADAM David Alan Martin <adam.martin@10gen.com> | 2019-07-27 11:02:23 -0400 |
commit | 134a4083953270e8a11430395357fb70a29047ad (patch) | |
tree | dd428e1230e31d92b20b393dfdc17ffe7fa79cb6 /src/mongo/client/fetcher.cpp | |
parent | 1e46b5049003f427047e723ea5fab15b5a9253ca (diff) | |
download | mongo-134a4083953270e8a11430395357fb70a29047ad.tar.gz |
SERVER-41772 Apply clang-format 7.0.1 to the codebase
Diffstat (limited to 'src/mongo/client/fetcher.cpp')
-rw-r--r-- | src/mongo/client/fetcher.cpp | 46 |
1 files changed, 14 insertions, 32 deletions
diff --git a/src/mongo/client/fetcher.cpp b/src/mongo/client/fetcher.cpp index 8e707c0ce02..8843227ded5 100644 --- a/src/mongo/client/fetcher.cpp +++ b/src/mongo/client/fetcher.cpp @@ -75,13 +75,12 @@ Status parseCursorResponse(const BSONObj& obj, if (cursorElement.eoo()) { return Status(ErrorCodes::FailedToParse, str::stream() << "cursor response must contain '" << kCursorFieldName - << "' field: " - << obj); + << "' field: " << obj); } if (!cursorElement.isABSONObj()) { - return Status( - ErrorCodes::FailedToParse, - str::stream() << "'" << kCursorFieldName << "' field must be an object: " << obj); + return Status(ErrorCodes::FailedToParse, + str::stream() + << "'" << kCursorFieldName << "' field must be an object: " << obj); } BSONObj cursorObj = cursorElement.Obj(); @@ -89,17 +88,13 @@ Status parseCursorResponse(const BSONObj& obj, if (cursorIdElement.eoo()) { return Status(ErrorCodes::FailedToParse, str::stream() << "cursor response must contain '" << kCursorFieldName << "." - << kCursorIdFieldName - << "' field: " - << obj); + << kCursorIdFieldName << "' field: " << obj); } if (cursorIdElement.type() != mongo::NumberLong) { return Status(ErrorCodes::FailedToParse, str::stream() << "'" << kCursorFieldName << "." << kCursorIdFieldName << "' field must be a 'long' but was a '" - << typeName(cursorIdElement.type()) - << "': " - << obj); + << typeName(cursorIdElement.type()) << "': " << obj); } batchData->cursorId = cursorIdElement.numberLong(); @@ -107,25 +102,19 @@ Status parseCursorResponse(const BSONObj& obj, if (namespaceElement.eoo()) { return Status(ErrorCodes::FailedToParse, str::stream() << "cursor response must contain " - << "'" - << kCursorFieldName - << "." - << kNamespaceFieldName - << "' field: " - << obj); + << "'" << kCursorFieldName << "." << kNamespaceFieldName + << "' field: " << obj); } if (namespaceElement.type() != mongo::String) { return Status(ErrorCodes::FailedToParse, str::stream() << "'" << kCursorFieldName << "." << kNamespaceFieldName - << "' field must be a string: " - << obj); + << "' field must be a string: " << obj); } const NamespaceString tempNss(namespaceElement.valueStringData()); if (!tempNss.isValid()) { return Status(ErrorCodes::BadValue, str::stream() << "'" << kCursorFieldName << "." << kNamespaceFieldName - << "' contains an invalid namespace: " - << obj); + << "' contains an invalid namespace: " << obj); } batchData->nss = tempNss; @@ -133,27 +122,20 @@ Status parseCursorResponse(const BSONObj& obj, if (batchElement.eoo()) { return Status(ErrorCodes::FailedToParse, str::stream() << "cursor response must contain '" << kCursorFieldName << "." - << batchFieldName - << "' field: " - << obj); + << batchFieldName << "' field: " << obj); } if (!batchElement.isABSONObj()) { return Status(ErrorCodes::FailedToParse, str::stream() << "'" << kCursorFieldName << "." << batchFieldName - << "' field must be an array: " - << obj); + << "' field must be an array: " << obj); } BSONObj batchObj = batchElement.Obj(); for (auto itemElement : batchObj) { if (!itemElement.isABSONObj()) { return Status(ErrorCodes::FailedToParse, str::stream() << "found non-object " << itemElement << " in " - << "'" - << kCursorFieldName - << "." - << batchFieldName - << "' field: " - << obj); + << "'" << kCursorFieldName << "." << batchFieldName + << "' field: " << obj); } batchData->documents.push_back(itemElement.Obj()); } |