From 8a1ad6c9877d6d3f8aaae1f23da5fa067d863161 Mon Sep 17 00:00:00 2001 From: lov3b Date: Mon, 6 Mar 2023 07:04:50 +0100 Subject: [PATCH] use get_ref_mut --- src/grandmother.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/grandmother.rs b/src/grandmother.rs index ea04f67..10758fe 100644 --- a/src/grandmother.rs +++ b/src/grandmother.rs @@ -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> {