Skip to content

Replace deprecated property, characters, with count #232

@axandreo

Description

@axandreo

In Logging.swift, line 57, you wrote:

private let maxCategoryNameLength = LogCategory.all.map { Int(String(describing: $0).characters.count) }.max() ?? 0

This causes a warning in Xcode because characters is a deprecated property in String now.

Since Strings are collections now, you can write this:

private let maxCategoryNameLength = LogCategory.all.map { Int(String(describing: $0).count) }.max() ?? 0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions