github serenity-rs/serenity v0.1.5
rustc nightly fix & optimizations

latest releases: v0.12.1, v0.12.0, v0.12.0-rc2...
7 years ago

This is a release to fix broken nightly builds, due to a change in how rustc
handles lifetimes, with a few performance optimizations and other fixes.

Upgrade Path

For Group::send_message, PrivateChannel::send_message,
and GuildChannel::send_message, instead of passing in only a &str of
content, use a CreateMessage builder:

// assuming a `channel` is bound

// old signature:
channel.send_message("hello");

// new signature:
channel.send_message(|m| m.content("hello"));

Instead of calling message_id.get_reaction_users and passing in a ChannelId,
call channel_id.get_reaction_users and pass in the MessageId. Note that the
latter already existed.

// assuming `channel_id`, `message_id`, and `reaction_type` are bound

// removed method:
message_id.get_reaction_users(channel_id, reaction_type, Some(10), None);

// alternative method:
channel_id.get_reaction_users(message_id, reaction_type, Some(10), None);

Added

  • Register the status user setting for user accounts (e.g. online, invisible)
    c:0b9bf91
  • Expose and document ratelimiting structures c:eb09f2d
  • Add method to EditGuild to transfer ownership c:f00e165

Fixed

  • Fix potential unreachable pattern warning in command! macro c:97f9bd1
  • Fix value of 'browser' in shard identify c:4cf8338
  • Remove lifetime on Search builder c:6f33a35

Changed

  • Standardize methods for creating messages c:c8c6b83
  • Remove MessageId::get_reaction_users c:268f356

Misc.

  • Avoid re-requesting the gateway URL when autosharding (optimization)
    c:e891ebe
  • Avoid cloning on non-framework message create events (opt.) c:b7cbf75
  • Avoid cloning the context on event dispatches (opt.) c:5ee5fef
  • Optimize presence update for current user in cache (opt.) c:9392f61
  • Make GLOBAL ratelimit mutex a unit (opt.) c:55ccaca
  • Resume when restarting WS sender/receiver c:04cfaa9

Don't miss a new serenity release

NewReleases is sending notifications on new releases.