From c8fc80381ec671b45e5aa1bba66e61d09249c90f Mon Sep 17 00:00:00 2001 From: Guillaume Lessard Date: Fri, 4 Oct 2024 15:20:11 -0700 Subject: [PATCH] remove workarounds --- Sources/Future/Span.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Sources/Future/Span.swift b/Sources/Future/Span.swift index 9a276b49..f6cfc139 100644 --- a/Sources/Future/Span.swift +++ b/Sources/Future/Span.swift @@ -485,7 +485,7 @@ extension Span where Element: ~Copyable { @_alwaysEmitIntoClient public subscript(unchecked position: Int) -> Element { _read { - let element = UnsafeRawPointer(_start).advanced(by: position&*MemoryLayout.stride) + let element = _start.advanced(by: position&*MemoryLayout.stride) let binding = Builtin.bindMemory(element._rawValue, count._builtinWordValue, Element.self) defer { Builtin.rebindMemory(element._rawValue, binding) } yield UnsafePointer(element._rawValue).pointee @@ -522,7 +522,7 @@ extension Span where Element: BitwiseCopyable { @_alwaysEmitIntoClient public subscript(unchecked position: Int) -> Element { get { - let address = UnsafeRawPointer(_start).advanced(by: position&*MemoryLayout.stride) + let address = _start.advanced(by: position&*MemoryLayout.stride) return address.loadUnaligned(as: Element.self) } }