From 3b7e83fb7c8f37ca9514b5b406a48e9bdefb3e48 Mon Sep 17 00:00:00 2001 From: Martin Larralde Date: Fri, 29 Mar 2019 23:17:07 +0100 Subject: [PATCH] Run `cargo fmt` on `tests/test_sequence.rs` --- tests/test_sequence.rs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/tests/test_sequence.rs b/tests/test_sequence.rs index eee1f458..1ea27be1 100644 --- a/tests/test_sequence.rs +++ b/tests/test_sequence.rs @@ -3,8 +3,8 @@ use pyo3::exceptions::IndexError; use pyo3::exceptions::ValueError; use pyo3::prelude::*; use pyo3::types::IntoPyDict; -use pyo3::types::PyList; use pyo3::types::PyAny; +use pyo3::types::PyList; #[macro_use] mod common; @@ -26,7 +26,9 @@ impl ByteSequence { } Self { elements: elems } } else { - Self { elements: Vec::new() } + Self { + elements: Vec::new(), + } }); Ok(()) } @@ -39,7 +41,8 @@ impl PySequenceProtocol for ByteSequence { } fn __getitem__(&self, idx: isize) -> PyResult { - self.elements.get(idx as usize) + self.elements + .get(idx as usize) .map(|&byte| byte) .ok_or(IndexError::py_err("list index out of range")) } @@ -103,7 +106,6 @@ impl PySequenceProtocol for ByteSequence { // } } - #[test] fn test_getitem() { let gil = Python::acquire_gil();