martin-g commented on code in PR #199:
URL: https://github.com/apache/avro-rs/pull/199#discussion_r2115759159


##########
avro/src/writer.rs:
##########
@@ -348,7 +354,18 @@ impl<'a, W: Write> Writer<'a, W> {
     pub fn into_inner(mut self) -> AvroResult<W> {
         self.maybe_write_header()?;
         self.flush()?;
-        Ok(self.writer)
+
+        let mut this = ManuallyDrop::new(self);
+
+        // Extract every member that is not Copy and therefore should be 
dropped
+        let _resolved_schema = std::mem::take(&mut this.resolved_schema);
+        let _buffer = std::mem::take(&mut this.buffer);
+        let _user_metadata = std::mem::take(&mut this.user_metadata);

Review Comment:
   What about `this.schema` and `this.resolved_schema` ?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to