refactor: convert Patch to abstract class

BREAKING CHANGE: Patch class is now an abstract class. You must implement it. You can use anonymous implements, like done in the tests.
This commit is contained in:
Lucaskyy
2022-03-20 21:57:20 +01:00
committed by oSumAtrIX
parent 428f7f4dec
commit cb9b1b9416
2 changed files with 56 additions and 57 deletions

View File

@@ -1,9 +1,5 @@
package net.revanced.patcher.patch
class Patch(val patchName: String, val fn: () -> PatchResult) {
fun execute(): PatchResult {
return fn()
}
abstract class Patch(val patchName: String) {
abstract fun execute(): PatchResult
}