Skip to content

Commit 4d53bd4

Browse files
AmityWilderIoIxD
andauthored
Fix lifetime mistake (#176)
Co-authored-by: IoIxD <30945097+IoIxD@users.noreply.github.com>
1 parent 7ed5adb commit 4d53bd4

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

raylib/src/core/audio.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -649,10 +649,8 @@ impl<'aud> AudioStream<'aud> {
649649
}
650650
}
651651

652-
impl<'bind> Sound<'_> {
653-
/// Clone sound from existing sound data, clone does not own wave data
654-
// NOTE: Wave data must be unallocated manually and will be shared across all clones
655-
pub fn alias<'snd>(&'snd self) -> Result<SoundAlias<'bind, 'snd>, Error> {
652+
impl<'bind> Sound<'bind> {
653+
pub fn alias<'snd>(&'snd self) -> Result<SoundAlias<'snd, 'bind>, Error> {
656654
let s = unsafe { ffi::LoadSoundAlias(self.0) };
657655
if s.stream.buffer.is_null() {
658656
return Err(error!("failed to load sound from wave"));

0 commit comments

Comments
 (0)