Skip to content

Commit 52b1c01

Browse files
committed
Miscellaneous PR feedback
1 parent a82e959 commit 52b1c01

File tree

2 files changed

+7
-10
lines changed

2 files changed

+7
-10
lines changed

ios/MullvadVPNTests/StartTunnelOperationTests.swift

+6-9
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ class StartTunnelOperationTests: XCTestCase {
3636
)
3737

3838
func makeInteractor(deviceState: DeviceState, tunnelState: TunnelState? = nil) -> MockTunnelInteractor {
39-
var interactor = MockTunnelInteractor(
39+
let interactor = MockTunnelInteractor(
4040
isConfigurationLoaded: true,
4141
settings: LatestTunnelSettings(),
4242
deviceState: deviceState
@@ -50,8 +50,7 @@ class StartTunnelOperationTests: XCTestCase {
5050
// MARK: the tests
5151

5252
func testFailsIfNotLoggedIn() throws {
53-
let settings = LatestTunnelSettings()
54-
let exp = expectation(description: "Start tunnel operation failed")
53+
let expectation = expectation(description: "Start tunnel operation failed")
5554
let operation = StartTunnelOperation(
5655
dispatchQueue: testQueue,
5756
interactor: makeInteractor(deviceState: .loggedOut)
@@ -60,16 +59,15 @@ class StartTunnelOperationTests: XCTestCase {
6059
XCTFail("Operation returned \(result), not failure")
6160
return
6261
}
63-
exp.fulfill()
62+
expectation.fulfill()
6463
}
6564

6665
operationQueue.addOperation(operation)
67-
wait(for: [exp], timeout: 1.0)
66+
wait(for: [expectation], timeout: 1.0)
6867
}
6968

7069
func testSetsReconnectIfDisconnecting() {
71-
let settings = LatestTunnelSettings()
72-
var interactor = makeInteractor(deviceState: loggedInDeviceState, tunnelState: .disconnecting(.nothing))
70+
let interactor = makeInteractor(deviceState: loggedInDeviceState, tunnelState: .disconnecting(.nothing))
7371
var tunnelStatus = TunnelStatus()
7472
interactor.onUpdateTunnelStatus = { status in tunnelStatus = status }
7573
let expectation = expectation(description: "Tunnel status set to reconnect")
@@ -86,8 +84,7 @@ class StartTunnelOperationTests: XCTestCase {
8684
}
8785

8886
func testStartsTunnelIfDisconnected() {
89-
let settings = LatestTunnelSettings()
90-
var interactor = makeInteractor(deviceState: loggedInDeviceState, tunnelState: .disconnected)
87+
let interactor = makeInteractor(deviceState: loggedInDeviceState, tunnelState: .disconnected)
9188
let expectation = expectation(description: "Make tunnel provider and start tunnel")
9289
let operation = StartTunnelOperation(
9390
dispatchQueue: testQueue,

ios/build-rust-library.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ for arch in $ARCHS; do
4343

4444
# Intel iOS simulator
4545
export CFLAGS_x86_64_apple_ios="-target x86_64-apple-ios"
46-
"$HOME"/.cargo/bin/cargo build -p "$FFI_TARGET" --lib "$RELFLAG" --target x86_64-apple-ios
46+
"$HOME"/.cargo/bin/cargo build -p "$FFI_TARGET" --lib $RELFLAG --target x86_64-apple-ios
4747
"$HOME"/.cargo/bin/cargo build -p "$FFI_TARGET" --lib --target x86_64-apple-ios
4848
;;
4949

0 commit comments

Comments
 (0)