Created
April 11, 2019 06:12
-
-
Save kunigami/1be9795e3571f8f3b7414657f3715ab4 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Every container key is smaller than the target_key. In this case we 'wrap around' the | |
// table and select the first element. | |
if (closest_key == std::u32::MAX) { | |
let result = self.containers.get_first(); | |
match result { | |
None => { | |
return Err("Did not find first entry."); | |
} | |
Some((_, entry)) => { | |
let container_id = &entry.id; | |
return Ok(container_id); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment