Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix Unmanaged.fromOpaque() usage in class Thread (#542)
Motivation: As discussed with Andrew Trick on the Swift Forums, the additional call to assumingMemoryBound(to:) is redundant here. Unmanaged.fromOpaque takes a raw pointer, and p is just that. See https://forums.swift.org/t/withunsafetypepunnedpointer/14540/9 for the discussion. Modifications: Deleted an unnecessary call to assumingMemoryBound(to:). With this change, we follow the intended usage of Unmanaged more closely. Result: No material change. We save one redundant UnsafeRawPointer -> UnsafePointer<ThreadBox> -> UnsafeRawPointer conversion.
- Loading branch information