Skip to content

The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.

style: apply rustfmt formatting and remove a redundant test

Steven Enamakel2347afc8ce0b
diff --git a/crates/openhuman-core/src/modules/accessibility.rs b/crates/openhuman-core/src/modules/accessibility.rs
index 1b658b96ba..dee07e1481 100644
--- a/crates/openhuman-core/src/modules/accessibility.rs
+++ b/crates/openhuman-core/src/modules/accessibility.rs
@@ -98,7 +98,6 @@ impl AccessibilityClient {
self.call(methods::ACCESSIBILITY_REQUEST_PERMISSION, (kind,), false)
.await
}
-
}
fn decode<T: DeserializeOwned>(raw: serde_json::Value) -> Result<T, AccessibilityError> {
diff --git a/crates/openhuman-core/src/modules/accessibility_tests.rs b/crates/openhuman-core/src/modules/accessibility_tests.rs
index 59278f291c..8c6fec78cf 100644
--- a/crates/openhuman-core/src/modules/accessibility_tests.rs
+++ b/crates/openhuman-core/src/modules/accessibility_tests.rs
@@ -4,7 +4,9 @@ use super::*;
#[tokio::test]
async fn permissions_without_a_loader_are_explicitly_unavailable() {
assert!(matches!(
- AccessibilityClient::new(&Config::default()).permissions().await,
+ AccessibilityClient::new(&Config::default())
+ .permissions()
+ .await,
Err(AccessibilityError::Bus(ModuleCallError::Unavailable))
));
}
diff --git a/crates/openhuman-core/src/modules/voice.rs b/crates/openhuman-core/src/modules/voice.rs
index c156f37de6..47900fe531 100644
--- a/crates/openhuman-core/src/modules/voice.rs
+++ b/crates/openhuman-core/src/modules/voice.rs
@@ -61,7 +61,9 @@ where
.call(method, args)
.await
.map_err(|error| match error.wire_name() {
- name if name.contains("ModuleUnavailable") => VoiceCallError::Unavailable(error.to_string()),
+ name if name.contains("ModuleUnavailable") => {
+ VoiceCallError::Unavailable(error.to_string())
+ }
_ => VoiceCallError::Failed(error.to_string()),
})
}
diff --git a/crates/openhuman-core/src/platform/about_app/ops_tests.rs b/crates/openhuman-core/src/platform/about_app/ops_tests.rs
index e1a26eb790..7c76a18a24 100644
--- a/crates/openhuman-core/src/platform/about_app/ops_tests.rs
+++ b/crates/openhuman-core/src/platform/about_app/ops_tests.rs
@@ -76,26 +76,3 @@ fn scheduled_job_capabilities_show_disabled_when_the_tinyflows_component_is_off(
);
}
}
-
-#[tokio::test]
-async fn an_explicit_context_decides_which_capabilities_are_disabled() {
- use crate::core::runtime::context::CoreContext;
- use crate::core::runtime::DispatchCtx;
-
- let mut voice_off = ComponentSet::all();
- voice_off.voice = false;
- let off = DispatchCtx::new(CoreContext::for_test_with_components(voice_off));
- let on = DispatchCtx::new(CoreContext::for_test_with_components(ComponentSet::all()));
-
- // The two contexts answer independently, concurrently and across awaits.
- let ask = |ctx: DispatchCtx| async move {
- tokio::task::yield_now().await;
- lookup_capability(&ctx, "conversation.send_text")
- .expect("send_text")
- .value
- .status
- };
- let (disabled, enabled) = tokio::join!(ask(off), ask(on));
- assert_eq!(disabled, CapabilityStatus::Available);
- assert_eq!(enabled, CapabilityStatus::Available);
-}
diff --git a/crates/openhuman-core/src/voice/schemas/handlers.rs b/crates/openhuman-core/src/voice/schemas/handlers.rs
index e5f5b3da4d..2b47b38883 100644
--- a/crates/openhuman-core/src/voice/schemas/handlers.rs
+++ b/crates/openhuman-core/src/voice/schemas/handlers.rs
@@ -8,8 +8,8 @@ mod provider_server;
mod transcribe_tts;
pub(super) use provider_server::{
- handle_voice_list_models, handle_voice_set_providers,
- handle_voice_test_provider, handle_voice_update_provider_settings,
+ handle_voice_list_models, handle_voice_set_providers, handle_voice_test_provider,
+ handle_voice_update_provider_settings,
};
pub(super) use transcribe_tts::{
handle_voice_reply_synthesize, handle_voice_status, handle_voice_stt_dispatch,
diff --git a/crates/openhuman-core/src/voice/schemas/registry.rs b/crates/openhuman-core/src/voice/schemas/registry.rs
index d0f33fbd70..8513b42b6e 100644
--- a/crates/openhuman-core/src/voice/schemas/registry.rs
+++ b/crates/openhuman-core/src/voice/schemas/registry.rs
@@ -4,10 +4,10 @@ use crate::core::all::RegisteredController;
use crate::core::{ControllerSchema, FieldSchema, TypeSchema};
use super::handlers::{
- handle_voice_list_models, handle_voice_reply_synthesize,
- handle_voice_set_providers, handle_voice_status, handle_voice_stt_dispatch,
- handle_voice_test_provider, handle_voice_transcribe, handle_voice_transcribe_bytes,
- handle_voice_tts, handle_voice_tts_dispatch, handle_voice_update_provider_settings,
+ handle_voice_list_models, handle_voice_reply_synthesize, handle_voice_set_providers,
+ handle_voice_status, handle_voice_stt_dispatch, handle_voice_test_provider,
+ handle_voice_transcribe, handle_voice_transcribe_bytes, handle_voice_tts,
+ handle_voice_tts_dispatch, handle_voice_update_provider_settings,
};
use super::helpers::{json_output, optional_bool, optional_string, required_string};