Comparison of connectivity and rigidity percolation