Commit 94f59e26 authored by Yedidya Feldblum's avatar Yedidya Feldblum Committed by Facebook Github Bot

Apply clang-format to folly/io/ (namespace)

Summary: [Folly] Apply `clang-format` to `folly/io/` (namespace).

Reviewed By: Orvid, terrelln

Differential Revision: D5366477

fbshipit-source-id: b4efcdc66c62885f5574b2940e5138590710deae
parent 4b5711db
......@@ -58,7 +58,8 @@
#include <algorithm>
#include <unordered_set>
namespace folly { namespace io {
namespace folly {
namespace io {
Codec::Codec(CodecType type) : type_(type) { }
......@@ -2323,4 +2324,5 @@ std::unique_ptr<Codec> getAutoUncompressionCodec(
std::vector<std::unique_ptr<Codec>> customCodecs) {
return AutomaticCodec::create(std::move(customCodecs));
}
}} // namespaces
} // namespace io
} // namespace folly
......@@ -30,7 +30,8 @@
* Compression / decompression over IOBufs
*/
namespace folly { namespace io {
namespace folly {
namespace io {
enum class CodecType {
/**
......@@ -466,4 +467,5 @@ bool hasCodec(CodecType type);
* Check if a specified codec is supported and supports streaming.
*/
bool hasStreamCodec(CodecType type);
}} // namespaces
} // namespace io
} // namespace folly
......@@ -105,6 +105,6 @@ void CursorBase<Derived, BufType>::skipWhile(const Predicate& predicate) {
CursorNoopAppender appender;
readWhile(predicate, appender);
}
}
}
} // folly::io::detail
} // namespace detail
} // namespace io
} // namespace folly
......@@ -18,7 +18,8 @@
#include <cstdio>
#include <folly/ScopeGuard.h>
namespace folly { namespace io {
namespace folly {
namespace io {
void Appender::printf(const char* fmt, ...) {
va_list ap;
......@@ -68,5 +69,5 @@ void Appender::vprintf(const char* fmt, va_list ap) {
}
append(len);
}
}} // folly::io
} // namespace io
} // namespace folly
......@@ -48,7 +48,8 @@
* Appender with a buffer chain; for this reason, Appenders assume private
* access to the buffer (you need to call unshare() yourself if necessary).
**/
namespace folly { namespace io {
namespace folly {
namespace io {
namespace detail {
......@@ -1049,7 +1050,7 @@ class QueueAppender : public detail::Writable<QueueAppender> {
folly::IOBufQueue* queue_;
size_t growth_;
};
}} // folly::io
} // namespace io
} // namespace folly
#include <folly/io/Cursor-inl.h>
......@@ -92,4 +92,4 @@ inline RecordInfo findRecord(ByteRange range, uint32_t fileId) {
} // namespace recordio_helpers
} // namespaces
} // namespace folly
......@@ -229,6 +229,6 @@ RecordInfo findRecord(ByteRange searchRange,
return {0, {}};
}
} // namespace
} // namespace recordio_helpers
} // namespaces
} // namespace folly
......@@ -174,6 +174,6 @@ RecordInfo validateRecord(ByteRange range, uint32_t fileId);
} // namespace recordio_helpers
} // namespaces
} // namespace folly
#include <folly/io/RecordIO-inl.h>
......@@ -176,4 +176,4 @@ void ShutdownSocketSet::doShutdown(int fd, bool abortive) {
folly::dup2NoInt(nullFile_.fd(), fd);
}
} // namespaces
} // namespace folly
......@@ -117,4 +117,4 @@ class ShutdownSocketSet : private boost::noncopyable {
folly::File nullFile_;
};
} // namespaces
} // namespace folly
......@@ -38,7 +38,9 @@
#include <zstd.h>
#endif
namespace folly { namespace io { namespace test {
namespace folly {
namespace io {
namespace test {
class DataHolder : private boost::noncopyable {
public:
......@@ -1127,7 +1129,9 @@ TEST(ZstdTest, BackwardCompatible) {
}
#endif
}}} // namespaces
} // namespace test
} // namespace io
} // namespace folly
int main(int argc, char *argv[]) {
testing::InitGoogleTest(&argc, argv);
......
......@@ -33,7 +33,8 @@
DEFINE_int32(random_seed, folly::randomNumberSeed(), "random seed");
namespace folly { namespace test {
namespace folly {
namespace test {
namespace {
// shortcut
......@@ -262,8 +263,9 @@ TEST(RecordIOTest, Randomized) {
EXPECT_EQ(records.size(), i);
}
}
} // namespace test
} // namespace folly
}} // namespaces
int main(int argc, char *argv[]) {
testing::InitGoogleTest(&argc, argv);
......
......@@ -28,7 +28,8 @@ using folly::ShutdownSocketSet;
namespace fsp = folly::portability::sockets;
namespace folly { namespace test {
namespace folly {
namespace test {
ShutdownSocketSet shutdownSocketSet;
......@@ -221,5 +222,5 @@ TEST(ShutdownSocketSetTest, OrderlyKill) {
TEST(ShutdownSocketSetTest, AbortiveKill) {
runKillTest(true);
}
}} // namespaces
} // namespace test
} // namespace folly
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment