Skip to content

Commit aa958d3

Browse files
committed
upgrades rust
1 parent 31f80f6 commit aa958d3

File tree

9 files changed

+15
-26
lines changed

9 files changed

+15
-26
lines changed

crates/amzn-consolas-client/src/json_errors.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ struct ErrorBody<'a> {
4242
message: Option<Cow<'a, str>>,
4343
}
4444

45-
fn parse_error_body(bytes: &[u8]) -> Result<ErrorBody<'_>, DeserializeError> {
45+
fn parse_error_body(bytes: &'_ [u8]) -> Result<ErrorBody<'_>, DeserializeError> {
4646
let mut tokens = json_token_iter(bytes).peekable();
4747
let (mut typ, mut code, mut message) = (None, None, None);
4848
if let Some(Token::StartObject { .. }) = tokens.next().transpose()? {

crates/amzn-toolkit-telemetry-client/src/json_errors.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ struct ErrorBody<'a> {
4141
message: Option<Cow<'a, str>>,
4242
}
4343

44-
fn parse_error_body(bytes: &[u8]) -> Result<ErrorBody, DeserializeError> {
44+
fn parse_error_body(bytes: &[u8]) -> Result<ErrorBody<'_>, DeserializeError> {
4545
let mut tokens = json_token_iter(bytes).peekable();
4646
let (mut typ, mut code, mut message) = (None, None, None);
4747
if let Some(Token::StartObject { .. }) = tokens.next().transpose()? {

crates/chat-cli/src/api_client/model.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ use serde::{
1717
Serializer,
1818
};
1919

20+
#[allow(dead_code)]
2021
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
2122
#[serde(rename_all = "camelCase")]
2223
pub struct FileContext {
@@ -26,12 +27,14 @@ pub struct FileContext {
2627
pub programming_language: ProgrammingLanguage,
2728
}
2829

30+
#[allow(dead_code)]
2931
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
3032
#[serde(rename_all = "camelCase")]
3133
pub struct ProgrammingLanguage {
3234
pub language_name: LanguageName,
3335
}
3436

37+
#[allow(dead_code)]
3538
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize, strum::AsRefStr)]
3639
#[serde(rename_all = "lowercase")]
3740
#[strum(serialize_all = "lowercase")]
@@ -53,18 +56,21 @@ pub enum LanguageName {
5356
Sql,
5457
}
5558

59+
#[allow(dead_code)]
5660
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
5761
#[serde(rename_all = "camelCase")]
5862
pub struct ReferenceTrackerConfiguration {
5963
pub recommendations_with_references: RecommendationsWithReferences,
6064
}
6165

66+
#[allow(dead_code)]
6267
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
6368
#[serde(rename_all = "UPPERCASE")]
6469
pub enum RecommendationsWithReferences {
6570
Block,
6671
}
6772

73+
#[allow(dead_code)]
6874
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
6975
#[serde(rename_all = "camelCase")]
7076
pub struct RecommendationsInput {
@@ -73,6 +79,7 @@ pub struct RecommendationsInput {
7379
pub next_token: Option<String>,
7480
}
7581

82+
#[allow(dead_code)]
7683
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
7784
#[serde(rename_all = "camelCase")]
7885
pub struct RecommendationsOutput {
@@ -82,6 +89,7 @@ pub struct RecommendationsOutput {
8289
pub request_id: Option<String>,
8390
}
8491

92+
#[allow(dead_code)]
8593
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
8694
#[serde(rename_all = "camelCase")]
8795
pub struct Recommendation {

crates/chat-cli/src/cli/chat/conversation.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -435,14 +435,14 @@ impl ConversationState {
435435
self.history
436436
.back()
437437
.and_then(|HistoryEntry { assistant, .. }| assistant.tool_uses())
438-
.map(|tools| (tools.iter().map(|t| t.id.as_str()).collect::<Vec<_>>().join(",")))
438+
.map(|tools| tools.iter().map(|t| t.id.as_str()).collect::<Vec<_>>().join(","))
439439
}
440440

441441
pub fn latest_tool_use_names(&self) -> Option<String> {
442442
self.history
443443
.back()
444444
.and_then(|HistoryEntry { assistant, .. }| assistant.tool_uses())
445-
.map(|tools| (tools.iter().map(|t| t.name.as_str()).collect::<Vec<_>>().join(",")))
445+
.map(|tools| tools.iter().map(|t| t.name.as_str()).collect::<Vec<_>>().join(","))
446446
}
447447

448448
/// Updates the history so that, when non-empty, the following invariants are in place:

crates/chat-cli/src/mcp_client/messenger.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ pub enum MessengerError {
7474
Custom(String),
7575
}
7676

77+
#[allow(dead_code)]
7778
#[derive(Clone, Debug)]
7879
pub struct NullMessenger;
7980

crates/chat-cli/src/mcp_client/oauth_util.rs

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -107,14 +107,6 @@ impl Drop for LoopBackDropGuard {
107107
}
108108
}
109109

110-
/// OAuth Authorization Server metadata for endpoint discovery
111-
#[derive(Clone, Serialize, Deserialize, Debug)]
112-
pub struct OAuthMeta {
113-
pub authorization_endpoint: String,
114-
pub token_endpoint: String,
115-
pub registration_endpoint: Option<String>,
116-
}
117-
118110
/// This is modeled after [OAuthClientConfig]
119111
/// It's only here because [OAuthClientConfig] does not implement Serialize and Deserialize
120112
#[derive(Clone, Serialize, Deserialize, Debug)]

crates/chat-cli/src/util/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ pub enum UtilError {
4444
Json(#[from] serde_json::Error),
4545
}
4646

47+
#[allow(dead_code)]
4748
#[derive(Debug, Clone)]
4849
pub struct UnknownDesktopErrContext {
4950
xdg_current_desktop: String,

crates/chat-cli/src/util/ui.rs

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,6 @@ use crossterm::style::{
66
Attribute,
77
};
88
use eyre::Result;
9-
use serde::{
10-
Deserialize,
11-
Serialize,
12-
};
139

1410
use crate::cli::feed::Feed;
1511
use crate::constants::ui_text;
@@ -158,15 +154,6 @@ fn print_with_bold(output: &mut impl Write, segments: &[(String, bool)]) -> Resu
158154
Ok(())
159155
}
160156

161-
#[derive(Default, Debug, Serialize, Deserialize)]
162-
#[serde(rename_all = "camelCase")]
163-
pub enum UiMode {
164-
#[default]
165-
Structured,
166-
Passthrough,
167-
New,
168-
}
169-
170157
pub fn should_send_structured_message(os: &Os) -> bool {
171158
let ui_mode = os.database.settings.get_string(Setting::UiMode);
172159

rust-toolchain.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[toolchain]
2-
channel = "1.87.0"
2+
channel = "1.90.0"
33
profile = "minimal"
44
components = ["rustfmt", "clippy"]
55
targets = [

0 commit comments

Comments
 (0)