Skip to content

Commit

Permalink
Also fix lints so new CI passes
Browse files Browse the repository at this point in the history
  • Loading branch information
jleibs committed Apr 29, 2023
1 parent ece52c0 commit 7377cac
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
6 changes: 3 additions & 3 deletions crates/re_log_types/src/arrow_msg.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,13 @@ impl serde::Serialize for ArrowMsg {
let mut writer = StreamWriter::new(&mut buf, Default::default());
writer
.start(&self.schema, None)
.map_err(|e| serde::ser::Error::custom(e.to_string()))?;
.map_err(|err| serde::ser::Error::custom(err.to_string()))?;
writer
.write(&self.chunk, None)
.map_err(|e| serde::ser::Error::custom(e.to_string()))?;
.map_err(|err| serde::ser::Error::custom(err.to_string()))?;
writer
.finish()
.map_err(|e| serde::ser::Error::custom(e.to_string()))?;
.map_err(|err| serde::ser::Error::custom(err.to_string()))?;

let mut inner = serializer.serialize_tuple(3)?;
inner.serialize_element(&self.table_id)?;
Expand Down
2 changes: 1 addition & 1 deletion crates/re_web_viewer_server/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ impl WebViewerServer {
pub fn new(port: WebViewerServerPort) -> Result<Self, WebViewerServerError> {
let bind_addr = format!("0.0.0.0:{port}").parse()?;
let server = hyper::Server::try_bind(&bind_addr)
.map_err(|e| WebViewerServerError::BindFailed(port, e))?
.map_err(|err| WebViewerServerError::BindFailed(port, err))?
.serve(MakeSvc);
Ok(Self { server })
}
Expand Down
2 changes: 1 addition & 1 deletion crates/re_ws_comms/src/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ impl RerunServer {

let listener = TcpListener::bind(&bind_addr)
.await
.map_err(|e| RerunServerError::BindFailed(port, e))?;
.map_err(|err| RerunServerError::BindFailed(port, err))?;

let port = RerunServerPort(listener.local_addr()?.port());

Expand Down
2 changes: 1 addition & 1 deletion crates/rerun/src/run.rs
Original file line number Diff line number Diff line change
Expand Up @@ -441,7 +441,7 @@ async fn run_impl(
app.set_profiler(profiler);
Box::new(app)
}))
.map_err(|e| e.into());
.map_err(|err| err.into());

#[cfg(not(feature = "native_viewer"))]
{
Expand Down
4 changes: 2 additions & 2 deletions rerun_py/src/arrow.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ fn array_to_rust(arrow_array: &PyAny, name: Option<&str>) -> PyResult<(Box<dyn A
// Following pattern from: https://github.com/pola-rs/polars/blob/master/examples/python_rust_compiled_function/src/ffi.rs
unsafe {
let mut field = ffi::import_field_from_c(schema.as_ref())
.map_err(|e| PyValueError::new_err(format!("Error importing Field: {e}")))?;
.map_err(|err| PyValueError::new_err(format!("Error importing Field: {err}")))?;

// There is a bad incompatibility between pyarrow and arrow2-convert
// Force the type to be correct.
Expand All @@ -49,7 +49,7 @@ fn array_to_rust(arrow_array: &PyAny, name: Option<&str>) -> PyResult<(Box<dyn A
}

let array = ffi::import_array_from_c(*array, field.data_type.clone())
.map_err(|e| PyValueError::new_err(format!("Error importing Array: {e}")))?;
.map_err(|err| PyValueError::new_err(format!("Error importing Array: {err}")))?;

if let Some(name) = name {
field.name = name.to_owned();
Expand Down

0 comments on commit 7377cac

Please sign in to comment.