From 4bca0c5bc2598088dd00e124a8291bdde907e3e9 Mon Sep 17 00:00:00 2001 From: kngwyu Date: Sat, 7 Sep 2019 16:05:22 +0900 Subject: [PATCH] Address clippy warning(to_args->toargs) --- src/err.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/err.rs b/src/err.rs index 610d2ce7076..bc091821ffe 100644 --- a/src/err.rs +++ b/src/err.rs @@ -30,7 +30,7 @@ pub enum PyErrValue { } impl PyErrValue { - pub fn to_args(value: T) -> Self { + pub fn toargs(value: T) -> Self { let _ = Python::acquire_gil(); PyErrValue::ToArgs(Box::new(value)) } @@ -430,7 +430,7 @@ macro_rules! impl_to_pyerr { impl std::convert::From<$err> for PyErr { fn from(err: $err) -> PyErr { - PyErr::from_value::<$pyexc>(PyErrValue::to_args(err)) + PyErr::from_value::<$pyexc>(PyErrValue::toargs(err)) } } }; @@ -441,7 +441,7 @@ impl std::convert::From for PyErr { fn from(err: io::Error) -> PyErr { macro_rules! err_value { () => { - PyErrValue::to_args(err) + PyErrValue::toargs(err) }; } match err.kind() { @@ -480,7 +480,7 @@ impl PyErrArguments for io::Error { impl std::convert::From> for PyErr { fn from(err: std::io::IntoInnerError) -> PyErr { - PyErr::from_value::(PyErrValue::to_args(err)) + PyErr::from_value::(PyErrValue::toargs(err)) } }