Commit a3323738 authored by Yedidya Feldblum's avatar Yedidya Feldblum Committed by Facebook Github Bot 9

Extract Unit to top-level

Summary:
[Folly] Extract `Unit` to top-level.

It was in `folly/futures/`, but this diff moves it to `folly/`. It is needed for futures, but it is more general than futures and can be used separately.

Users must replace `folly/futures/Unit.h` with `folly/Unit.h`.

Also codemods existing usage sites:

```
hg grep -lw folly/futures/Unit.h | xargs perl -pi -e 's,\bfolly/futures/Unit\.h\b,folly/Unit.h,g'
```

Reviewed By: igorsugak

Differential Revision: D3314280

fbshipit-source-id: 16279b76b1d24529bec49077ccb36cd7d39f23b8
parent 6b5a25fc
...@@ -175,7 +175,6 @@ nobase_follyinclude_HEADERS = \ ...@@ -175,7 +175,6 @@ nobase_follyinclude_HEADERS = \
futures/Timekeeper.h \ futures/Timekeeper.h \
futures/Try-inl.h \ futures/Try-inl.h \
futures/Try.h \ futures/Try.h \
futures/Unit.h \
futures/detail/Core.h \ futures/detail/Core.h \
futures/detail/FSM.h \ futures/detail/FSM.h \
futures/detail/Types.h \ futures/detail/Types.h \
...@@ -348,6 +347,7 @@ nobase_follyinclude_HEADERS = \ ...@@ -348,6 +347,7 @@ nobase_follyinclude_HEADERS = \
Traits.h \ Traits.h \
Unicode.h \ Unicode.h \
Function.h \ Function.h \
Unit.h \
Uri.h \ Uri.h \
Uri-inl.h \ Uri-inl.h \
Varint.h \ Varint.h \
......
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
#pragma once #pragma once
#include <folly/futures/detail/Types.h> #include <folly/futures/detail/Types.h>
#include <folly/futures/Unit.h> #include <folly/Unit.h>
namespace folly { namespace folly {
......
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
#include <folly/Memory.h> #include <folly/Memory.h>
#include <folly/Portability.h> #include <folly/Portability.h>
#include <folly/futures/FutureException.h> #include <folly/futures/FutureException.h>
#include <folly/futures/Unit.h> #include <folly/Unit.h>
namespace folly { namespace folly {
......
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
#include <gtest/gtest.h> #include <gtest/gtest.h>
#include <folly/futures/Future.h> #include <folly/futures/Future.h>
#include <folly/futures/Unit.h> #include <folly/Unit.h>
#include <folly/Memory.h> #include <folly/Memory.h>
#include <folly/Executor.h> #include <folly/Executor.h>
#include <folly/dynamic.h> #include <folly/dynamic.h>
......
...@@ -215,6 +215,9 @@ indestructible_test_SOURCES = IndestructibleTest.cpp ...@@ -215,6 +215,9 @@ indestructible_test_SOURCES = IndestructibleTest.cpp
indestructible_test_LDADD = libfollytestmain.la indestructible_test_LDADD = libfollytestmain.la
TESTS += indestructible_test TESTS += indestructible_test
unit_test_SOURCES = UnitTest.cpp
unit_test_LDADD = libfollytestmain.la
TESTS += unit_test
futures_test_SOURCES = \ futures_test_SOURCES = \
../futures/test/CollectTest.cpp \ ../futures/test/CollectTest.cpp \
...@@ -242,7 +245,6 @@ futures_test_SOURCES = \ ...@@ -242,7 +245,6 @@ futures_test_SOURCES = \
../futures/test/TimekeeperTest.cpp \ ../futures/test/TimekeeperTest.cpp \
../futures/test/TimesTest.cpp \ ../futures/test/TimesTest.cpp \
../futures/test/TryTest.cpp \ ../futures/test/TryTest.cpp \
../futures/test/UnitTest.cpp \
../futures/test/UnwrapTest.cpp \ ../futures/test/UnwrapTest.cpp \
../futures/test/ViaTest.cpp \ ../futures/test/ViaTest.cpp \
../futures/test/WaitTest.cpp \ ../futures/test/WaitTest.cpp \
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
#include <gtest/gtest.h> #include <gtest/gtest.h>
#include <folly/futures/Unit.h> #include <folly/Unit.h>
using namespace folly; using 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