Skip to content

Commit

Permalink
Update twilight support to twilight 0.11 (#132)
Browse files Browse the repository at this point in the history
* update twilight support to twilight 0.11

* rustfmt
  • Loading branch information
Erk- authored and FelixMcFelix committed Jul 22, 2022
1 parent 4eb95d4 commit 69339e8
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 13 deletions.
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -88,12 +88,12 @@ default-features = false

[dependencies.twilight-gateway]
optional = true
version = ">=0.9.0, <0.11.0"
version = "0.11.0"
default-features = false

[dependencies.twilight-model]
optional = true
version = ">=0.9.0, <0.11.0"
version = "0.11.0"
default-features = false

[dependencies.typemap_rev]
Expand Down
8 changes: 4 additions & 4 deletions examples/twilight/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ futures = "0.3"
tracing = "0.1"
tracing-subscriber = "0.2"
tokio = { features = ["macros", "rt-multi-thread", "sync"], version = "1" }
twilight-gateway = "0.10"
twilight-http = "0.10"
twilight-model = "0.10"
twilight-standby = "0.10"
twilight-gateway = "0.11"
twilight-http = "0.11"
twilight-model = "0.11"
twilight-standby = "0.11"

[dependencies.songbird]
default-features = false
Expand Down
6 changes: 1 addition & 5 deletions src/manager.rs
Original file line number Diff line number Diff line change
Expand Up @@ -105,11 +105,7 @@ impl Songbird {
{
Self {
client_data: PRwLock::new(ClientData {
shard_count: cluster
.config()
.shard_scheme()
.total()
.unwrap_or_else(|| cluster.shards().len() as u64),
shard_count: cluster.config().shard_scheme().total(),
initialised: true,
user_id: user_id.into(),
}),
Expand Down
5 changes: 3 additions & 2 deletions src/tracks/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,9 @@ impl fmt::Display for TrackError {
write!(f, "failed to operate on track (handle): ")?;
match self {
TrackError::Finished => write!(f, "track ended"),
TrackError::InvalidTrackEvent =>
write!(f, "given event listener can't be fired on a track"),
TrackError::InvalidTrackEvent => {
write!(f, "given event listener can't be fired on a track")
},
TrackError::SeekUnsupported => write!(f, "track did not support seeking"),
}
}
Expand Down

0 comments on commit 69339e8

Please sign in to comment.