Function
format_unpack
(
format_spec: &FormatSpec,
bytes: &[u8],
vm: &VirtualMachine,
)
Source from the content-addressed store, hash-verified
| 1133 | } |
| 1134 | |
| 1135 | fn format_unpack( |
| 1136 | format_spec: &FormatSpec, |
| 1137 | bytes: &[u8], |
| 1138 | vm: &VirtualMachine, |
| 1139 | ) -> PyResult<PyObjectRef> { |
| 1140 | format_spec.unpack(bytes, vm).map(|x| { |
| 1141 | if x.len() == 1 { |
| 1142 | x[0].to_owned() |
| 1143 | } else { |
| 1144 | x.into() |
| 1145 | } |
| 1146 | }) |
| 1147 | } |
| 1148 | |
| 1149 | fn is_equiv_shape(a: &BufferDescriptor, b: &BufferDescriptor) -> bool { |
| 1150 | if a.ndim() != b.ndim() { |
Tested by
no test coverage detected