pub fn on_request_approval(&mut self, request_id: RequestId, is_allowed: bool) -> Option<()> {
        let index = self
            .awaiting_approval
            .binary_search_by(|(id, _)| id.cmp(&request_id))
            .ok()?;
        let (request_id, direction) = self.awaiting_approval.remove(index);
        self.handle_request_approval(request_id, &direction, is_allowed)
    }
// Handle the approval of an individual request.
Handle the approval of an individual request.
Handle the approval of an individual request .
pub fn on_request_approval(&mut self, request_id: RequestId, is_allowed: bool) -> Option<()> {
        let index = self
            .awaiting_approval
            .binary_search_by(|(id, _)| id.cmp(&request_id))
            .ok()?;
        let (request_id, direction) = self.awaiting_approval.remove(index);
        self.handle_request_approval(request_id, &direction, is_allowed)
    }
pub fn on_request_approval ( & mut self , request_id : RequestId , is_allowed : bool ) -> Option < ( ) > { let index = self . awaiting_approval . binary_search_by ( | ( id , _ ) | id . cmp ( & request_id ) ) . ok ( ) ? ; let ( request_id , direction ) = self . awaiting_approval . remove ( index ) ; self . handle_request_approval ( request_id , & direction , is_allowed ) }
Handle the approval of an individual request.
Handle the approval of an individual request .
&mut self
request_id
RequestId
is_allowed
bool
&mut self
request_id
RequestId
is_allowed
bool