changing values in a vector
Collect the iterator into the new vector

You don't need to loop over a range to populate a vector with elements. The collect method has enough information to construct a Vec&lt;u64&gt; on the spot. This also makes the result variable unnecessary.

    pub fn new(length: u64) -&gt; QuickFind {
        QuickFind {
            items: (0..length).collect(),
        }
    }


C-GETTER

The convention for getter names is without the prefix get_, unless get makes up the entire method name. get_items(&amp;self) becomes items(&amp;self).

Reconsider usize as the index type.

There appear to be multiple conversions from u64 to usize in the code. Indeed, usize is the common integral type for referring to a relative (non-negative) position of a value in memory. With that done, the only integer cast is in new, so as to turn the range (0..length) into a range of values rather than a range of indices.

The final code:

Playground

#[derive(Debug)]
pub struct QuickFind {
    items: Vec&lt;u64&gt;,
}

impl QuickFind {
    pub fn new(length: usize) -&gt; QuickFind {
        QuickFind {
            items: (0..length as u64).collect(),
        }
    }

    pub fn union(&amp;mut self, left_index: usize, right_index: usize) {
        let left_group_id = self.items[left_index];

        self.items[right_index] = left_group_id;
    }

    pub fn items(&amp;self) -&gt; &amp;[u64] {
        &amp;self.items
    }

    pub fn is_connected(&amp;self, left_index: usize, right_index: usize) -&gt; bool {
        self.items[left_index] == self.items[right_index]
    }
}