diff --git a/audio/src/range_set.rs b/audio/src/range_set.rs index 005a4cda..9c4b0b87 100644 --- a/audio/src/range_set.rs +++ b/audio/src/range_set.rs @@ -229,7 +229,6 @@ impl RangeSet { self.ranges[self_index].end(), other.ranges[other_index].end(), ); - assert!(new_start <= new_end); result.add_range(&Range::new(new_start, new_end - new_start)); if self.ranges[self_index].end() <= other.ranges[other_index].end() { self_index += 1; diff --git a/connect/src/spirc.rs b/connect/src/spirc.rs index bea95c57..91256326 100644 --- a/connect/src/spirc.rs +++ b/connect/src/spirc.rs @@ -1059,7 +1059,6 @@ impl SpircTask { fn handle_unavailable(&mut self, track_id: SpotifyId) { let unavailables = self.get_track_index_for_spotify_id(&track_id, 0); for &index in unavailables.iter() { - debug_assert_eq!(self.state.get_track()[index].get_gid(), track_id.to_raw()); let mut unplayable_track_ref = TrackRef::new(); unplayable_track_ref.set_gid(self.state.get_track()[index].get_gid().to_vec()); // Misuse context field to flag the track @@ -1320,8 +1319,6 @@ impl SpircTask { .filter(|&(_, track_ref)| track_ref.get_gid() == track_id.to_raw()) .map(|(idx, _)| start_index + idx) .collect(); - // Sanity check - debug_assert!(!index.is_empty()); index } diff --git a/core/src/authentication.rs b/core/src/authentication.rs index 82df5060..1e5cf436 100644 --- a/core/src/authentication.rs +++ b/core/src/authentication.rs @@ -114,7 +114,6 @@ impl Credentials { let cipher = Aes192::new(GenericArray::from_slice(&key)); let block_size = ::BlockSize::to_usize(); - assert_eq!(data.len() % block_size, 0); for chunk in data.chunks_exact_mut(block_size) { cipher.decrypt_block(GenericArray::from_mut_slice(chunk)); } diff --git a/core/src/channel.rs b/core/src/channel.rs index 607189a0..c601cd7a 100644 --- a/core/src/channel.rs +++ b/core/src/channel.rs @@ -173,7 +173,6 @@ impl Stream for Channel { let length = BigEndian::read_u16(data.split_to(2).as_ref()) as usize; if length == 0 { - assert_eq!(data.len(), 0); self.state = ChannelState::Data; } else { let header_id = data.split_to(1).as_ref()[0]; diff --git a/core/src/dealer/mod.rs b/core/src/dealer/mod.rs index d598e6df..8da0a58c 100644 --- a/core/src/dealer/mod.rs +++ b/core/src/dealer/mod.rs @@ -165,6 +165,7 @@ fn split_uri(s: &str) -> Option> { let rest = rest.trim_end_matches(sep); let mut split = rest.split(sep); + #[cfg(debug_assertions)] if rest.is_empty() { assert_eq!(split.next(), Some("")); }