src: remove OnScopeLeaveImpl's move assignment overload

... as it's not valid implementation and also has not been used

PR-URL: https://github.com/nodejs/node/pull/48732
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
This commit is contained in:
Jason
2023-07-16 09:51:13 +08:00
committed by GitHub
parent d8eb8cffbb
commit 373848a457

View File

@@ -577,12 +577,6 @@ struct OnScopeLeaveImpl {
: fn_(std::move(other.fn_)), active_(other.active_) {
other.active_ = false;
}
OnScopeLeaveImpl& operator=(OnScopeLeaveImpl&& other) {
if (this == &other) return *this;
this->~OnScopeLeave();
new (this)OnScopeLeaveImpl(std::move(other));
return *this;
}
};
// Run a function when exiting the current scope. Used like this: