From 1a5fd953c186df5726c5de98b96618248acabf25 Mon Sep 17 00:00:00 2001 From: sttk Date: Sun, 17 Aug 2025 06:14:38 +0900 Subject: [PATCH] deps: bumped up sabi-rust to 0.4 --- Cargo.toml | 2 +- src/standalone.rs | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 22f2de4..1e95915 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -16,7 +16,7 @@ categories = ["database"] errs = "0.2" r2d2 = "0.8" redis = { version = "0.32", features = ["r2d2"] } -sabi-rust = "0.2" +sabi-rust = "0.4" [dev-dependencies] override_macro = "0.1" diff --git a/src/standalone.rs b/src/standalone.rs index 7348cba..d9ac927 100644 --- a/src/standalone.rs +++ b/src/standalone.rs @@ -184,18 +184,18 @@ mod test_redis { #[test] fn ok() { - let mut hub = DataHub::new(); - hub.uses("redis", RedisDataSrc::new("redis://127.0.0.1:6379")); - if let Err(err) = hub.run(sample_logic) { + let mut data = DataHub::new(); + data.uses("redis", RedisDataSrc::new("redis://127.0.0.1:6379")); + if let Err(err) = sabi::run!(sample_logic, data) { panic!("{:?}", err); } } #[test] fn fail() { - let mut hub = DataHub::new(); - hub.uses("redis", RedisDataSrc::new("xxxxx")); - if let Err(err) = hub.run(sample_logic) { + let mut data = DataHub::new(); + data.uses("redis", RedisDataSrc::new("xxxxx")); + if let Err(err) = sabi::run!(sample_logic, data) { if let Ok(r) = err.reason::() { match r { sabi::DataHubError::FailToSetupLocalDataSrcs { errors } => {