We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5d8f11d commit a370387Copy full SHA for a370387
src/lazyvalue/owned.rs
@@ -175,9 +175,9 @@ impl LazyRaw {
175
fn parse(&mut self) -> Result<Parsed> {
176
let ptr = self.parsed.get_mut();
177
if !(*ptr).is_null() {
178
- let v = unsafe { std::ptr::read(*ptr) };
+ let v = unsafe { Box::from_raw(*ptr) };
179
*ptr = std::ptr::null_mut();
180
- return Ok(v);
+ return Ok(*v);
181
}
182
183
let mut parser = crate::parser::Parser::new(crate::Read::from(&self.raw));
0 commit comments