pub async fn update(&self) -> Result<(), anyhow::Error> {
        let target_channel = self.lookup_target_channel_from_vbmeta().await?;
        if target_channel.is_some()
            && self.target_channel.lock().as_ref() == target_channel.as_ref()
        {
            return Ok(());
        }

        if let Some(channel) = target_channel {
            self.set_target_channel(channel).await?;
            return Ok(());
        }

        // If no vbmeta channel is present, try using the rewrite rules.
        // This ensures that the target channel is a sensible value for local builds.
        let target_channel = self.lookup_target_channel_from_rewrite_engine().await?;
        if self.target_channel.lock().as_ref() == Some(&target_channel) {
            return Ok(());
        }

        self.set_target_channel(target_channel).await
    }
/// Fetch the target channel from vbmeta, if one is present.
/// Otherwise, will attempt to guess channel from the current rewrite rules.
Fetch the target channel from vbmeta, if one is present.
Otherwise, will attempt to guess channel from the current rewrite rules.
Fetch the target channel from vbmeta if one is present . Otherwise will attempt to guess channel from the current rewrite rules .
pub async fn update(&self) -> Result<(), anyhow::Error> {
        let target_channel = self.lookup_target_channel_from_vbmeta().await?;
        if target_channel.is_some()
            && self.target_channel.lock().as_ref() == target_channel.as_ref()
        {
            return Ok(());
        }
        if let Some(channel) = target_channel {
            self.set_target_channel(channel).await?;
            return Ok(());
        }
        // If no vbmeta channel is present, try using the rewrite rules.
        // This ensures that the target channel is a sensible value for local builds.
        let target_channel = self.lookup_target_channel_from_rewrite_engine().await?;
        if self.target_channel.lock().as_ref() == Some(&target_channel) {
            return Ok(());
        }
        self.set_target_channel(target_channel).await
    }
pub async fn update ( & self ) -> Result < ( ) , anyhow :: Error > { let target_channel = self . lookup_target_channel_from_vbmeta ( ) . await ? ; if target_channel . is_some ( ) && self . target_channel . lock ( ) . as_ref ( ) == target_channel . as_ref ( ) { return Ok ( ( ) ) ; } if let Some ( channel ) = target_channel { self . set_target_channel ( channel ) . await ? ; return Ok ( ( ) ) ; } // If no vbmeta channel is present, try using the rewrite rules. // This ensures that the target channel is a sensible value for local builds. let target_channel = self . lookup_target_channel_from_rewrite_engine ( ) . await ? ; if self . target_channel . lock ( ) . as_ref ( ) == Some ( & target_channel ) { return Ok ( ( ) ) ; } self . set_target_channel ( target_channel ) . await }
Fetch the target channel from vbmeta, if one is present.
Fetch the target channel from vbmeta if one is present .
&self
&self