Skip to content

Commit ec0b2f8

Browse files
shoumikhinfacebook-github-bot
authored andcommitted
Let's not expose the underlying Method. (#13543)
Summary: . Reviewed By: mergennachin Differential Revision: D80595270
1 parent db6e28d commit ec0b2f8

File tree

2 files changed

+0
-18
lines changed

2 files changed

+0
-18
lines changed

extension/module/module.cpp

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -215,12 +215,6 @@ runtime::Error Module::load_method(
215215
return runtime::Error::Ok;
216216
}
217217

218-
ET_NODISCARD runtime::Result<Method*> Module::method(
219-
const std::string& method_name) {
220-
ET_CHECK_OK_OR_RETURN_ERROR(load_method(method_name));
221-
return methods_[method_name].method.get();
222-
}
223-
224218
runtime::Result<MethodMeta> Module::method_meta(
225219
const std::string& method_name) {
226220
ET_CHECK_OK_OR_RETURN_ERROR(load());

extension/module/module.h

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -205,18 +205,6 @@ class Module {
205205
return methods_.erase(method_name);
206206
}
207207

208-
/**
209-
* Get a method by it's name. Not recommended to use this method directly as
210-
* an end user. It's exposed to allow for composability of module in apis that
211-
* operate on method.
212-
*
213-
* @param[in] method_name The name of the method to get.
214-
*
215-
* @returns A Result object containing either a pointer to the requested
216-
* method or an error to indicate failure.
217-
*/
218-
ET_NODISCARD runtime::Result<Method*> method(const std::string& method_name);
219-
220208
/**
221209
* Load the 'forward' method from the program and set up memory management if
222210
* needed. The loaded method is cached to reuse the next time it's executed.

0 commit comments

Comments
 (0)