fix typo, fix bytesinner.add now return Vec[u8]

This commit is contained in:
Jimmy Girardet
2019-04-09 14:43:13 +02:00
parent 2940c7cc28
commit 6c745f68dd
2 changed files with 4 additions and 4 deletions

View File

@@ -134,7 +134,7 @@ impl PyBytesRef {
#[pymethod(name = "__add__")]
fn add(self, other: PyObjectRef, vm: &VirtualMachine) -> PyResult {
match_class!(other,
bytes @ PyBytes => self.inner.add(&bytes.inner, vm),
bytes @ PyBytes => Ok(vm.ctx.new_bytes(self.inner.add(&bytes.inner, vm))),
_ => Ok(vm.ctx.not_implemented()))
}