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