diff options
| author | sigoden <sigoden@gmail.com> | 2025-06-28 19:17:43 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-06-28 19:17:43 +0800 |
| commit | 419790fb74fbaf47d54519238b5a542a3875961e (patch) | |
| tree | 8917db58a4a77a514079bf115d670a3f82003c03 /src/config/session.rs | |
| parent | bad300bbce72dff6f085fc8b94e8ffbdd103f47f (diff) | |
| download | aichat-419790fb74fbaf47d54519238b5a542a3875961e.tar.gz | |
chore: clippy (#1334)
Diffstat (limited to 'src/config/session.rs')
| -rw-r--r-- | src/config/session.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/config/session.rs b/src/config/session.rs index a895e64..f3a86de 100644 --- a/src/config/session.rs +++ b/src/config/session.rs @@ -79,7 +79,7 @@ impl Session { let content = read_to_string(path) .with_context(|| format!("Failed to load session {} at {}", name, path.display()))?; let mut session: Self = - serde_yaml::from_str(&content).with_context(|| format!("Invalid session {}", name))?; + serde_yaml::from_str(&content).with_context(|| format!("Invalid session {name}"))?; session.model = Model::retrieve_model(config, &session.model_id, ModelType::Chat)?; @@ -158,7 +158,7 @@ impl Session { data["max_input_tokens"] = max_input_tokens.into(); } if percent != 0.0 { - data["total/max"] = format!("{}%", percent).into(); + data["total/max"] = format!("{percent}%").into(); } data["messages"] = json!(self.messages); |
