I'm trying to migrate this (https://github.com/emilwojtaszek/leveldb-swift) project from Swift 2 to Swift 3. I've cleared all 100+ errors during migration except this following one:
Initializer 'init(bytes:count:)' has different argument names from those required by protocol 'KeyType' ('init(bytes:length:)')
I was struggling to figure out the reason for it past couple of hours and getting no clue of what the problem is, any thoughts?
P.S.
Here is the link to project with current state of migration:
https://drive.google.com/file/d/1pR6-NrJFYGOwYyLLg_SbYNCQ9lyF6Ljc/view?usp=sharing
Here is an screenshot of the problem:
In Swift 2 we used to have NSData with the initializer init(bytes:length:). Since Apple has done a lot of renaming in Swift 3, NSData is called Data and the initializer is called init(bytes:count:) now.
So everything you need to do is to update your KeyType protocol: