rust/hg-cpython/src/revlog.rs
changeset 52175 c90e0f65896e
parent 52174 bcd4962e0df9
child 52176 1032bb0ef365
equal deleted inserted replaced
52174:bcd4962e0df9 52175:c90e0f65896e
   135     {
   135     {
   136         unsafe { std::slice::from_raw_parts(cbuf as *const u8, len) }
   136         unsafe { std::slice::from_raw_parts(cbuf as *const u8, len) }
   137     } else {
   137     } else {
   138         return Err(PyErr::new::<ValueError, _>(
   138         return Err(PyErr::new::<ValueError, _>(
   139             py,
   139             py,
   140             "Nodemap data buffer has an invalid memory representation"
   140             "buffer has an invalid memory representation".to_string(),
   141                 .to_string(),
       
   142         ));
   141         ));
   143     };
   142     };
   144 
   143 
   145     Ok((buf, Box::new(bytes)))
   144     Ok((buf, Box::new(bytes)))
   146 }
   145 }