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 authored and Michaël Zasso committed 2023-11-26 20:32:21 +01:00
1 parent e455dd4003
commit 358273d77f
1 file changed
-6
-6
View File
@@ -568,12 +568,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: