module: thread hyperhive package directly — operators don't apply overlays
This commit is contained in:
parent
8dc9b24934
commit
4f91dfef99
6 changed files with 23 additions and 25 deletions
|
|
@ -66,11 +66,7 @@ impl From<hive_sh4re::ManagerResponse> for SocketReply {
|
|||
/// Format helper for "send-like" tools (anything that expects an `Ok`).
|
||||
/// `tool` and `ok_msg` only appear in the result string; they don't change
|
||||
/// behavior.
|
||||
pub fn format_ack(
|
||||
resp: Result<SocketReply, anyhow::Error>,
|
||||
tool: &str,
|
||||
ok_msg: String,
|
||||
) -> String {
|
||||
pub fn format_ack(resp: Result<SocketReply, anyhow::Error>, tool: &str, ok_msg: String) -> String {
|
||||
match resp {
|
||||
Ok(SocketReply::Ok) => ok_msg,
|
||||
Ok(SocketReply::Err(m)) => format!("{tool} failed: {m}"),
|
||||
|
|
@ -274,7 +270,10 @@ impl ManagerServer {
|
|||
|
||||
/// Helper: issue any `ManagerRequest`, convert the reply through
|
||||
/// `SocketReply`. Manager tools that just need an `Ok` ack share this.
|
||||
async fn dispatch(&self, req: hive_sh4re::ManagerRequest) -> Result<SocketReply, anyhow::Error> {
|
||||
async fn dispatch(
|
||||
&self,
|
||||
req: hive_sh4re::ManagerRequest,
|
||||
) -> Result<SocketReply, anyhow::Error> {
|
||||
client::request::<_, hive_sh4re::ManagerResponse>(&self.socket, &req)
|
||||
.await
|
||||
.map(SocketReply::from)
|
||||
|
|
|
|||
|
|
@ -295,8 +295,4 @@ fn html_escape(s: &str) -> String {
|
|||
.replace('"', """)
|
||||
}
|
||||
|
||||
const STYLE: &str = concat!(
|
||||
"<style>\n",
|
||||
include_str!("../assets/agent.css"),
|
||||
"</style>",
|
||||
);
|
||||
const STYLE: &str = concat!("<style>\n", include_str!("../assets/agent.css"), "</style>",);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue