pub fn new_socket_with(&mut self, chip: Box<dyn Chip>) -> Rc<RefCell<Socket>> {
        let socket = Rc::new(RefCell::new(Socket::new()));
        socket.borrow_mut().plug(chip);
        self.sockets.push(socket);
        // unwrap because we just pushed a value so there's no reason to get a None here
        self.sockets.last_mut().unwrap().clone()
    }
/// Create a new socket with a chip and return it
Create a new socket with a chip and return it
Create a new socket with a chip and return it
pub fn new_socket_with(&mut self, chip: Box<dyn Chip>) -> Rc<RefCell<Socket>> {
        let socket = Rc::new(RefCell::new(Socket::new()));
        socket.borrow_mut().plug(chip);
        self.sockets.push(socket);
        // unwrap because we just pushed a value so there's no reason to get a None here
        self.sockets.last_mut().unwrap().clone()
    }
pub fn new_socket_with ( & mut self , chip : Box < dyn Chip > ) -> Rc < RefCell < Socket > > { let socket = Rc :: new ( RefCell :: new ( Socket :: new ( ) ) ) ; socket . borrow_mut ( ) . plug ( chip ) ; self . sockets . push ( socket ) ; // unwrap because we just pushed a value so there's no reason to get a None here self . sockets . last_mut ( ) . unwrap ( ) . clone ( ) }
Create a new socket with a chip and return it
Create a new socket with a chip and return it
&mut self
chip
Box<dyn Chip>
&mut self
chip
Box<dyn Chip>