-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Bump rust toolchain to 1.92 (current stable) #6356
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1 @@ | ||
| .rustup-1.25.2.pkg | ||
| .rustup-1.28.2.pkg |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1 @@ | ||
| .rustup-1.25.2.pkg | ||
| .rustup-1.28.2.pkg |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1 @@ | ||
| .rustup-1.25.2.pkg | ||
| .rustup-1.28.2.pkg |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1 @@ | ||
| .rustup-1.25.2.pkg | ||
| .rustup-1.28.2.pkg |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1 @@ | ||
| .rustup-1.25.2.pkg | ||
| .rustup-1.28.2.pkg |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1 @@ | ||
| .rustup-1.25.2.pkg | ||
| .rustup-1.28.2.pkg |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1 @@ | ||
| .rustup-1.25.2.pkg | ||
| .rustup-1.28.2.pkg |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1 @@ | ||
| .rustup-1.25.2.pkg | ||
| .rustup-1.28.2.pkg |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1 @@ | ||
| .rustup-1.25.2.pkg | ||
| .rustup-1.28.2.pkg |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1 @@ | ||
| .rustup-1.25.2.pkg | ||
| .rustup-1.28.2.pkg |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1 @@ | ||
| .rustup-1.25.2.pkg | ||
| .rustup-1.28.2.pkg |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1 @@ | ||
| .rustup-1.25.2.pkg | ||
| .rustup-1.28.2.pkg |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1 @@ | ||
| .rustup-1.25.2.pkg | ||
| .rustup-1.28.2.pkg |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1 @@ | ||
| .rustup-1.25.2.pkg | ||
| .rustup-1.28.2.pkg |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -10,7 +10,7 @@ use rmcp::model::{ | |
| object, AnnotateAble, CallToolRequestParam, Content, ErrorCode, ErrorData, RawContent, | ||
| ResourceContents, Role, Tool, | ||
| }; | ||
| use serde::{Deserialize, Serialize}; | ||
| use serde::Serialize; | ||
| use serde_json::{json, Value}; | ||
| use std::borrow::Cow; | ||
|
|
||
|
|
@@ -370,43 +370,6 @@ pub fn response_to_message(response: &Value) -> anyhow::Result<Message> { | |
| )) | ||
| } | ||
|
|
||
| #[derive(Serialize, Deserialize, Debug)] | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. were these just unused?
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah seems so, and I'm not sure why it wasn't flagged by the build before, but I'm guessing some improvements were made between 1.88 and 1.92 to finding dead code |
||
| struct DeltaToolCallFunction { | ||
| name: Option<String>, | ||
| arguments: String, // chunk of encoded JSON, | ||
| } | ||
|
|
||
| #[derive(Serialize, Deserialize, Debug)] | ||
| struct DeltaToolCall { | ||
| id: Option<String>, | ||
| function: DeltaToolCallFunction, | ||
| index: Option<i32>, | ||
| r#type: Option<String>, | ||
| } | ||
|
|
||
| #[derive(Serialize, Deserialize, Debug)] | ||
| struct Delta { | ||
| content: Option<String>, | ||
| role: Option<String>, | ||
| tool_calls: Option<Vec<DeltaToolCall>>, | ||
| } | ||
|
|
||
| #[derive(Serialize, Deserialize, Debug)] | ||
| struct StreamingChoice { | ||
| delta: Delta, | ||
| index: Option<i32>, | ||
| finish_reason: Option<String>, | ||
| } | ||
|
|
||
| #[derive(Serialize, Deserialize, Debug)] | ||
| struct StreamingChunk { | ||
| choices: Vec<StreamingChoice>, | ||
| created: Option<i64>, | ||
| id: Option<String>, | ||
| usage: Option<Value>, | ||
| model: String, | ||
| } | ||
|
|
||
| /// Check if the model name indicates a Claude/Anthropic model that supports cache control. | ||
| fn is_claude_model(model_name: &str) -> bool { | ||
| model_name.contains("claude") | ||
|
|
@@ -740,13 +703,13 @@ mod tests { | |
| }), | ||
| ); | ||
|
|
||
| let spec = format_tools(&[tool.clone()], "gpt-4o")?; | ||
| let spec = format_tools(std::slice::from_ref(&tool), "gpt-4o")?; | ||
| assert_eq!( | ||
| spec[0]["function"]["parameters"]["$schema"], | ||
| "http://json-schema.org/draft-07/schema#" | ||
| ); | ||
|
|
||
| let spec = format_tools(&[tool.clone()], "gemini-2-5-flash")?; | ||
| let spec = format_tools(std::slice::from_ref(&tool), "gemini-2-5-flash")?; | ||
| assert!(spec[0]["function"]["parameters"].get("$schema").is_none()); | ||
| assert_eq!(spec[0]["function"]["parameters"]["type"], "object"); | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -439,7 +439,7 @@ impl Provider for GcpVertexAIProvider { | |
| where | ||
| Self: Sized, | ||
| { | ||
| let model_strings: Vec<String> = vec![ | ||
| let model_strings: Vec<String> = [ | ||
|
||
| GcpVertexAIModel::Claude(ClaudeVersion::Sonnet37), | ||
| GcpVertexAIModel::Claude(ClaudeVersion::Sonnet4), | ||
| GcpVertexAIModel::Claude(ClaudeVersion::Opus4), | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,3 @@ | ||
| [toolchain] | ||
| channel = "1.88.0" | ||
| channel = "1.92" | ||
| profile = "default" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Type mismatch: assigning an array directly to a Vec variable. The array should be followed by .to_vec() or the type annotation should be removed to allow type inference.