Spot the bug in the .copying branch

from Enums and pattern matching
Swift 6.3.3 intermediate 4 min 1 issue to find

Find why low progress never receives its specific message.

swift
enum TransferState {
    case waiting
    case copying(progress: Double)
    case finished
}

func message(for state: TransferState) -> String {
    switch state {
    case .waiting:
        return "Waiting"
    case .copying(let progress):
        return "Copying \(Int(progress * 100))%"
    case .copying(let progress) where progress < 0.1:
        return "Starting"
    case .finished:
        return "Done"
    }
}
Open in playground
Report an error