#[derive(Debug)]
pub struct Input<InstantRef, StateRef, HeapRef> {
pub instant: InstantRef,
pub state: StateRef,
pub heap: HeapRef,
}
impl<Instant, State, Heap> Input<&Instant, &mut State, &mut Heap> {
#[inline]
pub const fn reborrow(&mut self) -> Input<&Instant, &mut State, &mut Heap> {
Input {
instant: self.instant,
state: self.state,
heap: self.heap,
}
}
#[inline]
pub const fn reborrow_with<'a>(
&mut self,
instant: &'a Instant,
) -> Input<&'a Instant, &mut State, &mut Heap> {
Input {
instant,
state: self.state,
heap: self.heap,
}
}
}
#[cfg(test)]
mod tests {
use super::*;
use crate::instant::Instant;
#[test]
fn ensure_input_debug() {
let instant = Instant::new("123");
let input = Input {
instant: &instant,
state: &mut (),
heap: &mut (),
};
let _ = format!("{:?}", input);
}
}