mirror of
https://github.com/samsonjs/vibetunnel.git
synced 2026-04-27 15:17:38 +00:00
Small refactor
This commit is contained in:
parent
63d57d6ab9
commit
c4e5890aa8
1 changed files with 9 additions and 9 deletions
|
|
@ -35,7 +35,6 @@ fn list_sessions(control_path: &Path) -> Result<(), anyhow::Error> {
|
||||||
.file_name()
|
.file_name()
|
||||||
.and_then(|n| n.to_str())
|
.and_then(|n| n.to_str())
|
||||||
.unwrap_or("unknown");
|
.unwrap_or("unknown");
|
||||||
|
|
||||||
let session_json_path = path.join("session.json");
|
let session_json_path = path.join("session.json");
|
||||||
let stream_out_path = path.join("stream-out");
|
let stream_out_path = path.join("stream-out");
|
||||||
let stdin_path = path.join("stdin");
|
let stdin_path = path.join("stdin");
|
||||||
|
|
@ -61,14 +60,15 @@ fn list_sessions(control_path: &Path) -> Result<(), anyhow::Error> {
|
||||||
.and_then(|content| serde_json::from_str(&content).map_err(Into::into))
|
.and_then(|content| serde_json::from_str(&content).map_err(Into::into))
|
||||||
.unwrap_or_default();
|
.unwrap_or_default();
|
||||||
|
|
||||||
let session_entry = SessionListEntry {
|
sessions.insert(
|
||||||
session_info,
|
session_id.to_string(),
|
||||||
stream_out,
|
SessionListEntry {
|
||||||
stdin,
|
session_info,
|
||||||
notification_stream,
|
stream_out,
|
||||||
};
|
stdin,
|
||||||
|
notification_stream,
|
||||||
sessions.insert(session_id.to_string(), serde_json::to_value(session_entry)?);
|
},
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue