From 6fee7617cfa910fbac7035276e295ba967adbbb4 Mon Sep 17 00:00:00 2001 From: Jeffrey Davis Date: Tue, 27 Aug 2024 19:28:41 -0700 Subject: [PATCH] Fix warnings. --- PythonKit/NumpyConversion.swift | 2 +- Tests/PythonKitTests/PythonFunctionTests.swift | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/PythonKit/NumpyConversion.swift b/PythonKit/NumpyConversion.swift index c802694..e0c81a2 100644 --- a/PythonKit/NumpyConversion.swift +++ b/PythonKit/NumpyConversion.swift @@ -137,7 +137,7 @@ where Element : NumpyScalarCompatible { self.init(repeating: dummyPointer.move(), count: scalarCount) dummyPointer.deallocate() withUnsafeMutableBufferPointer { buffPtr in - buffPtr.baseAddress!.assign(from: ptr, count: scalarCount) + buffPtr.baseAddress!.update(from: ptr, count: scalarCount) } } } diff --git a/Tests/PythonKitTests/PythonFunctionTests.swift b/Tests/PythonKitTests/PythonFunctionTests.swift index db39d06..f11ad57 100644 --- a/Tests/PythonKitTests/PythonFunctionTests.swift +++ b/Tests/PythonKitTests/PythonFunctionTests.swift @@ -204,7 +204,7 @@ class PythonFunctionTests: XCTestCase { // Example of function with no named parameters, which can be stated // ergonomically using an underscore. The ignored input is a [PythonObject]. - let testFunction = PythonFunction { _ in + let _ = PythonFunction { _ in throw HelloWorldException("EXAMPLE ERROR MESSAGE", 2) }.pythonObject