Skip to content

Commit

Permalink
Add #[must_use] for Playable::play
Browse files Browse the repository at this point in the history
I stumbled upon this for a second, a warning would have helped :)
  • Loading branch information
barafael committed May 29, 2023
1 parent ef6172b commit 501095d
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/core/base.rs
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ impl PlaybackHandle {
/// A trait for types that can be "played" via the system's audio output.
pub trait Playable {
/// Plays the [`Playable`].
///
/// Dropping the returned [`PlayableResult`] will stop the playback.
#[must_use = "Dropping the PlayableResult will stop the playback."]
fn play(&self, delay: f32, length: f32, fade_in: f32) -> Res<PlaybackHandle>;
}

0 comments on commit 501095d

Please sign in to comment.