swift-json
has a _move
in this closure API:
@inlinable public mutating
func pop<T>(_ key:String, _ body:(JSON) throws -> T) rethrows -> T?
{
guard let value:JSON = self.pop(key)
else
{
return nil
}
do
{
#if swift(>=5.8)
return try body(_move value)
#else
return try body( value)
#endif
}
catch let error
{
throw RecursiveError.dictionary(underlying: error, in: key)
}
}
in light of the discussion `borrow` and `take` parameter ownership modifiers , is there any point in having this _move
?