self.pos = n;
Ok(self.pos)
}
- None => Err(Error::new(
+ None => Err(Error::new_const(
ErrorKind::InvalidInput,
- "invalid seek to a negative or overflowing position",
+ &"invalid seek to a negative or overflowing position",
)),
}
}
// Resizing write implementation
fn vec_write(pos_mut: &mut u64, vec: &mut Vec<u8>, buf: &[u8]) -> io::Result<usize> {
let pos: usize = (*pos_mut).try_into().map_err(|_| {
- Error::new(
+ Error::new_const(
ErrorKind::InvalidInput,
- "cursor position exceeds maximum possible vector length",
+ &"cursor position exceeds maximum possible vector length",
)
})?;
// Make sure the internal buffer is as least as big as where we