remain

Compile-time checks that an enum or match is written in sorted order

APACHE-2.0 License

Downloads
1M
Stars
111
Committers
3
remain - Latest Release

Published by dtolnay 6 months ago

  • Resolve unexpected_cfgs warning (#21)
remain -

Published by dtolnay 8 months ago

  • Fix unused_imports warnings when compiled by rustc 1.78
remain -

Published by dtolnay 10 months ago

  • Update proc-macro2 to fix caching issue when using a rustc-wrapper such as sccache
remain -

Published by dtolnay over 1 year ago

  • Documentation improvements
remain -

Published by dtolnay over 1 year ago

remain -

Published by dtolnay over 1 year ago

  • Add no-alloc category to crates.io metadata
remain -

Published by dtolnay over 1 year ago

  • Update syn dependency to 2.x
remain -

Published by dtolnay over 1 year ago

  • Set html_root_url attribute
remain -

Published by dtolnay almost 2 years ago

  • Documentation improvements
remain -

Published by dtolnay almost 2 years ago

remain -

Published by dtolnay about 2 years ago

  • Add categories to crates.io metadata
remain -

Published by dtolnay over 2 years ago

  • Add rust-version entry to Cargo.toml to declare the oldest supported compiler version
remain -

Published by dtolnay almost 4 years ago

  • Documentation improvements
remain -

Published by dtolnay almost 5 years ago

(no changes, retrigger docs.rs build)

remain -

Published by dtolnay almost 5 years ago

  • Implement smarter numeric comparison (#10, thanks @Juici)

    For example, the following is considered correctly sorted:

    #[sorted]
    pub enum Test {
        E9,
        E10,
    }
    
remain -

Published by dtolnay almost 5 years ago

  • Add an #[unsorted] attribute to allow individual items to be ignored (#4, thanks @Juici)

    #[remain::sorted]
    pub enum Bucket {
        ChannelsId(ChannelId),
        ChannelsIdInvites(ChannelId),
        ChannelsIdMessages(ChannelId),
        ChannelsIdMessagesBulkDelete(ChannelId),
        ChannelsIdMessagesId(ChannelId),
        ChannelsIdMessagesIdDelete(ChannelId),
        ChannelsIdMessagesIdReactions(ChannelId),
        ChannelsIdMessagesIdReactionsEmoji(ChannelId),
        ChannelsIdMessagesIdReactionsEmojiMe(ChannelId),
        ChannelsIdMessagesIdReactionsEmojiUserId(ChannelId),
        ChannelsIdPermissionsOverwriteId(ChannelId),
        ChannelsIdPins(ChannelId),
        ChannelsIdPinsMessageId(ChannelId),
        ChannelsIdRecipientsUserId(ChannelId),
        ChannelsIdTyping(ChannelId),
        ChannelsIdWebhooks(ChannelId),
        Guilds,
        GuildsId(GuildId),
        GuildsIdAuditLogs(GuildId),
        GuildsIdBans(GuildId),
        GuildsIdBansUserId(GuildId),
        GuildsIdChannels(GuildId),
        GuildsIdEmbed(GuildId),
        GuildsIdEmojis(GuildId),
        GuildsIdEmojisId(GuildId),
        GuildsIdIntegrations(GuildId),
        GuildsIdIntegrationsId(GuildId),
        GuildsIdIntegrationsIdSync(GuildId),
        GuildsIdInvites(GuildId),
        GuildsIdMembers(GuildId),
        GuildsIdMembersId(GuildId),
        GuildsIdMembersIdRolesId(GuildId),
        GuildsIdMembersMeNick(GuildId),
        GuildsIdPrune(GuildId),
        GuildsIdRegions(GuildId),
        GuildsIdRoles(GuildId),
        GuildsIdRolesId(GuildId),
        GuildsIdVanityUrl(GuildId),
        GuildsIdWebhooks(GuildId),
        InvitesCode,
        UsersId,
        UsersMe,
        UsersMeChannels,
        UsersMeConnections,
        UsersMeGuilds,
        UsersMeGuildsId(GuildId),
        VoiceRegions,
        WebhooksId(WebhookId),
    
        #[unsorted]
        None,
        #[doc(hidden)]
        __Nonexhaustive,
    }
    
remain -

Published by dtolnay about 5 years ago

  • Update to Syn 1.0
remain -

Published by dtolnay over 5 years ago

  • Add support for checking order of named fields in a struct (#2, thanks @jeremyBanks)
remain -

Published by dtolnay over 5 years ago

  • Use case-insensitive comparisons
remain -

Published by dtolnay over 5 years ago