Update Rust to v1.98.0
Fixes a new clippy lint (needless_late_init) by turning the text_to_speech_stage_params if/else into an expression. Supersedes https://github.com/etkecc/baibot/pull/259 Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
[toolchain]
|
[toolchain]
|
||||||
channel = "1.97.1"
|
channel = "1.98.0"
|
||||||
components = ["rustfmt", "clippy"]
|
components = ["rustfmt", "clippy"]
|
||||||
profile = "default"
|
profile = "default"
|
||||||
|
|||||||
@@ -147,9 +147,7 @@ pub async fn handle(
|
|||||||
// Let's proceed below where we potentially handle text-generation.
|
// Let's proceed below where we potentially handle text-generation.
|
||||||
}
|
}
|
||||||
|
|
||||||
let text_to_speech_stage_params: Option<TextToSpeechParams>;
|
let text_to_speech_stage_params: Option<TextToSpeechParams> = if message_context
|
||||||
|
|
||||||
if message_context
|
|
||||||
.room_config_context()
|
.room_config_context()
|
||||||
.should_auto_text_generate(original_message_is_audio)
|
.should_auto_text_generate(original_message_is_audio)
|
||||||
{
|
{
|
||||||
@@ -210,7 +208,7 @@ pub async fn handle(
|
|||||||
return Ok(());
|
return Ok(());
|
||||||
};
|
};
|
||||||
|
|
||||||
text_to_speech_stage_params = match message_context
|
match message_context
|
||||||
.room_config_context()
|
.room_config_context()
|
||||||
.text_to_speech_bot_messages_flow_type()
|
.text_to_speech_bot_messages_flow_type()
|
||||||
{
|
{
|
||||||
@@ -243,7 +241,7 @@ pub async fn handle(
|
|||||||
text_to_speech_eligible_payload,
|
text_to_speech_eligible_payload,
|
||||||
response_type,
|
response_type,
|
||||||
)),
|
)),
|
||||||
};
|
}
|
||||||
} else {
|
} else {
|
||||||
tracing::debug!("Not generating text due to auto-usage configuration");
|
tracing::debug!("Not generating text due to auto-usage configuration");
|
||||||
|
|
||||||
@@ -262,7 +260,7 @@ pub async fn handle(
|
|||||||
event_id: message_context.event_id().clone(),
|
event_id: message_context.event_id().clone(),
|
||||||
};
|
};
|
||||||
|
|
||||||
text_to_speech_stage_params = match message_context
|
match message_context
|
||||||
.room_config_context()
|
.room_config_context()
|
||||||
.text_to_speech_user_messages_flow_type()
|
.text_to_speech_user_messages_flow_type()
|
||||||
{
|
{
|
||||||
@@ -275,8 +273,8 @@ pub async fn handle(
|
|||||||
text_to_speech_eligible_payload,
|
text_to_speech_eligible_payload,
|
||||||
response_type,
|
response_type,
|
||||||
)),
|
)),
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
};
|
||||||
|
|
||||||
// We're potentially dealing with some text in text_to_speech_eligible_payload - either coming directly from the user or generated by an agent.
|
// We're potentially dealing with some text in text_to_speech_eligible_payload - either coming directly from the user or generated by an agent.
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user