func (rtr *Rotor) Scrub(x circuit.X) XID {
	rtr.Lock()
	defer rtr.Unlock()
	for i, xid := range rtr.open {
		if xid.X == x {
			n := len(rtr.open)
			rtr.open[i] = rtr.open[n-1]
			rtr.open = rtr.open[:n-1]
			return xid
		}
	}
	return XID{}
}
// Scrub looks up an XID by the value of its cross-interface;
// If it finds a matching XID, it removes it from the rotor
// and returns the removed XID.
Scrub looks up an XID by the value of its cross-interface;
If it finds a matching XID, it removes it from the rotor
and returns the removed XID.
// Scrub looks up an XID by the value of its cross - interface ; // If it finds a matching XID it removes it from the rotor // and returns the removed XID .
func (rtr *Rotor) Scrub(x circuit.X) XID {
	rtr.Lock()
	defer rtr.Unlock()
	for i, xid := range rtr.open {
		if xid.X == x {
			n := len(rtr.open)
			rtr.open[i] = rtr.open[n-1]
			rtr.open = rtr.open[:n-1]
			return xid
		}
	}
	return XID{}
}
func ( rtr * Rotor ) Scrub ( x circuit . X ) XID { rtr . Lock ( ) defer rtr . Unlock ( ) for i , xid := range rtr . open { if xid . X == x { n := len ( rtr . open ) rtr . open [ i ] = rtr . open [ n - 1 ] rtr . open = rtr . open [ : n - 1 ] return xid } } return XID { } }
Scrub looks up an XID by the value of its cross-interface;
If it finds a matching XID, it removes it from the rotor
and returns the removed XID.
Scrub looks up an XID by the value of its cross - interface ; If it finds a matching XID it removes it from the rotor and returns the removed XID .