ziperu 0.3.1 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -46,10 +46,16 @@ const CHUNK: usize = 64 * 1024;
46
46
  const CAPACITY_HINT_MAX: u64 = 1 << 20;
47
47
 
48
48
  /// A Ruby IO read through `read(n)`, forward only.
49
- struct RubyRead {
49
+ pub(crate) struct RubyRead {
50
50
  io: Opaque<Value>,
51
51
  }
52
52
 
53
+ impl RubyRead {
54
+ pub(crate) fn new(io: Opaque<Value>) -> Self {
55
+ Self { io }
56
+ }
57
+ }
58
+
53
59
  impl Read for RubyRead {
54
60
  fn read(&mut self, buf: &mut [u8]) -> io::Result<usize> {
55
61
  if buf.is_empty() {