mirror of
https://github.com/ultraworkers/claw-code-parity.git
synced 2026-06-24 19:01:12 +00: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:
parent
9cfbb8ceed
commit
ec5d3a546b
@ -269,8 +269,7 @@ impl Session {
|
|||||||
let session_id = object
|
let session_id = object
|
||||||
.get("session_id")
|
.get("session_id")
|
||||||
.and_then(JsonValue::as_str)
|
.and_then(JsonValue::as_str)
|
||||||
.map(ToOwned::to_owned)
|
.map_or_else(generate_session_id, ToOwned::to_owned);
|
||||||
.unwrap_or_else(generate_session_id);
|
|
||||||
let created_at_ms = object
|
let created_at_ms = object
|
||||||
.get("created_at_ms")
|
.get("created_at_ms")
|
||||||
.map(|value| required_u64_from_value(value, "created_at_ms"))
|
.map(|value| required_u64_from_value(value, "created_at_ms"))
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user