From 3ef7a86594d6b56aad0d26b0f90d4156b377938b Mon Sep 17 00:00:00 2001 From: Joseph Perez Date: Fri, 18 Oct 2024 16:45:38 +0200 Subject: [PATCH] fix: fix typo in drop-callback warning --- src/handlers.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/handlers.rs b/src/handlers.rs index ce2460e..e07c156 100644 --- a/src/handlers.rs +++ b/src/handlers.rs @@ -29,12 +29,12 @@ use crate::{ type RustCallback = zenoh::handlers::Callback; const CHECK_SIGNALS_INTERVAL: Duration = Duration::from_millis(100); -const DONE_CALLBACK_WARNING: &str = "Passing drop-callback using a tuple \ -`(callback, drop-callback)` no more works in 1.0;\n\ +const DROP_CALLBACK_WARNING: &str = "Passing drop-callback using a tuple \ +`(callback, drop-callback)` no longer works in 1.0;\n\ `zenoh.handlers.Callback(callback, drop_callback)` must be used instead.\n\ -The tuple form is reserved for passing a handler with`(callback, handler)`.\n\ -If you are already passing a handler but having this warning wrongly displayed, \ -you can silent it with:\n\ +The tuple form is reserved for passing a handler with `(callback, handler)`.\n\ +If you are already passing a handler and this warning is still incorrectly displayed, \ +you can silence it with:\n\ warnings.filterwarnings(\"ignore\", message=\"Passing drop-callback\")"; fn log_error(py: Python, result: PyResult) { @@ -444,7 +444,7 @@ where .filter(|(cb, _)| cb.is_callable()) { if handler.bind(py).is_callable() { - import!(py, warnings.warn).call1((DONE_CALLBACK_WARNING,))?; + import!(py, warnings.warn).call1((DROP_CALLBACK_WARNING,))?; } (python_callback(&cb)?, HandlerImpl::Python(handler)) } else {