From 0dde55f9c477e4dc241c5cb6f655c7a07134b54f Mon Sep 17 00:00:00 2001 From: Jeffrey Davis Date: Tue, 27 Aug 2024 19:21:19 -0700 Subject: [PATCH] Fix warnings. --- PythonKit/NumpyConversion.swift | 2 +- Tests/PythonKitTests/PythonFunctionTests.swift | 2 +- temp | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) create mode 100644 temp 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 diff --git a/temp b/temp new file mode 100644 index 0000000..9ae9ea0 --- /dev/null +++ b/temp @@ -0,0 +1 @@ +Contents \ No newline at end of file