We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b1f0537 commit e7fafa1Copy full SHA for e7fafa1
src/shims/fs.rs
@@ -56,7 +56,7 @@ impl FileHandler {
56
let new_fd = candidate_new_fd.unwrap_or_else(|| {
57
// find_map ran out of BTreeMap entries before finding a free fd, use one plus the
58
// maximum fd in the map
59
- self.handles.last_entry().map(|entry| entry.key().checked_add(1).unwrap()).unwrap_or(min_fd)
+ self.handles.last_key_value().map(|(fd, _)| fd.checked_add(1).unwrap()).unwrap_or(min_fd)
60
});
61
62
self.handles.insert(new_fd, file_handle).unwrap_none();
0 commit comments