Files
swift-nio/Sources
Ole Begemann cf55bee323 Simplify C string to String conversion in IOError.reasonForError (#544)
* Simplify C string to String conversion in IOError.reasonForError

Motivation:

The standard library already has a String initializer that takes a
null-terminated UTF-8 C string. There's no need to construct an
UnsafeBufferPointer to use the Collection-based init(decoding:as:).

Modifications:

Replaced a manual pointer conversion with the appropriate stdlib API.

Result:

No change. Both version return the same String. The new version is
is arguably more correct because it saves the memory-rebinding step.

I haven't added new tests because the modified code is covered by
SystemTest.testErrorsWorkCorrectly.
2018-08-01 17:22:35 +01:00
..
2018-06-09 18:18:24 -07:00
2017-12-15 09:50:12 +00:00
2018-03-19 14:45:32 +01:00