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
diff --git a/init/modalias_handler.h b/init/modalias_handler.h
index 3247c86..7d0afde 100644
--- a/init/modalias_handler.h
+++ b/init/modalias_handler.h
@@ -35,11 +35,11 @@
void HandleUevent(const Uevent& uevent) override;
private:
- Result<Success> InsmodWithDeps(const std::string& module_name, const std::string& args);
- Result<Success> Insmod(const std::string& path_name, const std::string& args);
+ Result<void> InsmodWithDeps(const std::string& module_name, const std::string& args);
+ Result<void> Insmod(const std::string& path_name, const std::string& args);
- Result<Success> ParseDepCallback(std::vector<std::string>&& args);
- Result<Success> ParseAliasCallback(std::vector<std::string>&& args);
+ Result<void> ParseDepCallback(std::vector<std::string>&& args);
+ Result<void> ParseAliasCallback(std::vector<std::string>&& args);
std::vector<std::pair<std::string, std::string>> module_aliases_;
std::unordered_map<std::string, std::vector<std::string>> module_deps_;