Skip to content

Commit

Permalink
minor (cargo clippy fix)
Browse files Browse the repository at this point in the history
  • Loading branch information
124C41p committed Sep 19, 2023
1 parent 21c2320 commit 20e2d33
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions betterproto-extras/src/encode/chunk.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
use std::ops::Deref;

use super::{message::MessageEncoder, EncodeResult};
use prost::{bytes::BufMut, encoding as enc, Message};
use pyo3::{types::PyList, FromPyObject, PyAny, PyResult};
use std::ops::Deref;

pub struct Chunk(ChunkVariant);

Expand Down Expand Up @@ -31,8 +30,8 @@ impl Chunk {
tag,
value,
|x| Ok(x.extract::<Vec<T>>()?),
|tag, ls| len_fn(tag, &ls),
|tag, ls, buf| encoder(tag, &ls, buf),
|tag, ls| len_fn(tag, ls),
|tag, ls, buf| encoder(tag, ls, buf),
)
}

Expand All @@ -47,8 +46,8 @@ impl Chunk {
.map(|x| x.getattr("value").unwrap_or(x).extract::<i32>())
.collect::<PyResult<Vec<i32>>>()?)
},
|tag, ls| enc::int32::encoded_len_packed(tag, &ls),
|tag, ls, buf| enc::int32::encode_packed(tag, &ls, buf),
|tag, ls| enc::int32::encoded_len_packed(tag, ls),
|tag, ls, buf| enc::int32::encode_packed(tag, ls, buf),
)
}

Expand Down

0 comments on commit 20e2d33

Please sign in to comment.