pub(crate) fn shorten(
state: &AppState,
pane: &str,
agent: &str,
minutes: u64,
) -> Option<(Grant, u64)>Expand description
An agent asked for minutes while pane already holds its live grant: cut the grant to that when it has
longer left, so it lasts what was asked or less. Returns the grant as it is now and the minutes it had
left, when it was cut.