fn replace_root_with_github(&mut self) -> bool {
        // Check if there is a github token to act as the root authentication
        if self.github.is_some() {
            // Swap github to the root position. Use Option::take
            // to extract the value and leave a None in its place.
            let gh: GitHubIdentity = self.github.take().unwrap();
            self.root = RootIdentity::GitHub(gh);
            return true;
        }

        // If we could not replace the root, return false.
        return false;
    }
/// Try to replace the root identity with the secondary GitHub identity.
/// Return true on success.
Try to replace the root identity with the secondary GitHub identity.
Return true on success.
Try to replace the root identity with the secondary GitHub identity . Return true on success .
fn replace_root_with_github(&mut self) -> bool {
        // Check if there is a github token to act as the root authentication
        if self.github.is_some() {
            // Swap github to the root position. Use Option::take
            // to extract the value and leave a None in its place.
            let gh: GitHubIdentity = self.github.take().unwrap();
            self.root = RootIdentity::GitHub(gh);
            return true;
        }
        // If we could not replace the root, return false.
        return false;
    }
fn replace_root_with_github ( & mut self ) -> bool { // Check if there is a github token to act as the root authentication if self . github . is_some ( ) { // Swap github to the root position. Use Option::take // to extract the value and leave a None in its place. let gh : GitHubIdentity = self . github . take ( ) . unwrap ( ) ; self . root = RootIdentity :: GitHub ( gh ) ; return true ; } // If we could not replace the root, return false. return false ; }
Try to replace the root identity with the secondary GitHub identity.
Try to replace the root identity with the secondary GitHub identity .
&mut self
&mut self