Skip to content

Commit

Permalink
fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
xlc committed Jul 26, 2024
1 parent d54abfa commit b30e1ff
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions PolkaVM/Sources/PolkaVM/Instructions.swift
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ public enum Instructions {
}

public func executeImpl(state: VMState) -> ExitReason? {
if let _ = try? state.memory.write(address: address, value: value) {
if (try? state.memory.write(address: address, value: value)) != nil {
return nil
}
return .pageFault(address)
Expand All @@ -105,7 +105,7 @@ public enum Instructions {
}

public func executeImpl(state: VMState) -> ExitReason? {
if let _ = try? state.memory.write(address: address, values: value.encode(method: .fixedWidth(2))) {
if (try? state.memory.write(address: address, values: value.encode(method: .fixedWidth(2)))) != nil {
return nil
}
return .pageFault(address)
Expand All @@ -125,7 +125,7 @@ public enum Instructions {
}

public func executeImpl(state: VMState) -> ExitReason? {
if let _ = try? state.memory.write(address: address, values: value.encode(method: .fixedWidth(4))) {
if (try? state.memory.write(address: address, values: value.encode(method: .fixedWidth(4)))) != nil {
return nil
}
return .pageFault(address)
Expand Down

0 comments on commit b30e1ff

Please sign in to comment.