use get_ref_mut

This commit is contained in:
Love 2023-03-06 07:04:50 +01:00
parent 2d5f795bfb
commit 8a1ad6c987

View File

@ -1,6 +1,7 @@
#[allow(unused_imports)]
use crate::GetM3u8;
use crate::{
get_mut_ref,
parser::{Parser, WatchedFind},
Configuration, OfflineParser, OnlineParser, Playlist, MAX_TRIES,
};
@ -47,8 +48,7 @@ impl GrandMother {
}
pub async fn refresh_dirty(&self) -> Result<(), Error> {
let ptr = self as *const Self as *mut Self;
unsafe { &mut *ptr }.refresh().await
unsafe { get_mut_ref(self) }.refresh().await
}
pub async fn refresh(&mut self) -> Result<(), Error> {