summaryrefslogtreecommitdiff
path: root/init/host_import_parser.cpp
diff options
context:
space:
mode:
authorTom Cherry <tomcherry@google.com>2019-06-10 11:08:01 -0700
committerTom Cherry <tomcherry@google.com>2019-06-10 12:39:18 -0700
commitbbcbc2ffb339b2388e0cc282bb698fe436100b42 (patch)
tree3b1ab414d943a4a9b50dd29c581807fa2092ed06 /init/host_import_parser.cpp
parentcaa95d551d7f3b86d609b09bb4ab98e2435f6bc8 (diff)
init: replace Result<Success> with Result<void>
Now that Result<T> is actually expected<T, ...>, and the expected proposal states expected<void, ...> as the way to indicate an expected object that returns either successfully with no object or an error, let's move init's Result<Success> to the preferred Result<void>. Bug: 132145659 Test: boot, init unit tests Change-Id: Ib2f98396d8e6e274f95a496fcdfd8341f77585ee
Diffstat (limited to 'init/host_import_parser.cpp')
-rw-r--r--init/host_import_parser.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/init/host_import_parser.cpp b/init/host_import_parser.cpp
index 93e363ff3..aa80199fc 100644
--- a/init/host_import_parser.cpp
+++ b/init/host_import_parser.cpp
@@ -23,16 +23,16 @@ using android::base::StartsWith;
namespace android {
namespace init {
-Result<Success> HostImportParser::ParseSection(std::vector<std::string>&& args, const std::string&,
- int) {
+Result<void> HostImportParser::ParseSection(std::vector<std::string>&& args, const std::string&,
+ int) {
if (args.size() != 2) {
return Error() << "single argument needed for import\n";
}
- return Success();
+ return {};
}
-Result<Success> HostImportParser::ParseLineSection(std::vector<std::string>&&, int) {
+Result<void> HostImportParser::ParseLineSection(std::vector<std::string>&&, int) {
return Error() << "Unexpected line found after import statement";
}