mirror of
https://github.com/ultraworkers/claw-code-parity.git
synced 2026-04-22 20:56:16 +02:00
fix(runtime): use map_or_else for session id fallback
Resolves clippy::map_unwrap_or in session.rs. Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
This commit is contained in:
@@ -269,8 +269,7 @@ impl Session {
|
||||
let session_id = object
|
||||
.get("session_id")
|
||||
.and_then(JsonValue::as_str)
|
||||
.map(ToOwned::to_owned)
|
||||
.unwrap_or_else(generate_session_id);
|
||||
.map_or_else(generate_session_id, ToOwned::to_owned);
|
||||
let created_at_ms = object
|
||||
.get("created_at_ms")
|
||||
.map(|value| required_u64_from_value(value, "created_at_ms"))
|
||||
|
||||
Reference in New Issue
Block a user