pub fn close_fd(&mut self, fd: usize) -> bool {
        if self.file_descriptors.remove(&fd).is_some() {
            while self.file_descriptors.get(&(self.next_fd - 1)).is_none() {
                if self.next_fd == 0 {
                    break;
                }
                self.next_fd -= 1;
            }
            true
        } else {
            false
        }
    }
/// Close a file descriptor. Returns true if file descriptor existed, false
/// otherwise
Close a file descriptor. Returns true if file descriptor existed, false
otherwise
Close a file descriptor . Returns true if file descriptor existed false otherwise
pub fn close_fd(&mut self, fd: usize) -> bool {
        if self.file_descriptors.remove(&fd).is_some() {
            while self.file_descriptors.get(&(self.next_fd - 1)).is_none() {
                if self.next_fd == 0 {
                    break;
                }
                self.next_fd -= 1;
            }
            true
        } else {
            false
        }
    }
pub fn close_fd ( & mut self , fd : usize ) -> bool { if self . file_descriptors . remove ( & fd ) . is_some ( ) { while self . file_descriptors . get ( & ( self . next_fd - 1 ) ) . is_none ( ) { if self . next_fd == 0 { break ; } self . next_fd -= 1 ; } true } else { false } }
Close a file descriptor.
Close a file descriptor .
&mut self
fd
usize