Skip to content

Upgrade to Rust 1.82 #733

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

Merged
merged 3 commits into from
Nov 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:

name: Continuous integration
env:
latest_version: "1.81.0"
latest_version: "1.82.0"

jobs:
test:
Expand Down
2 changes: 1 addition & 1 deletion example_apps/console/src/model/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ pub enum AppCommand {
Quit,
Clear,
Help { command_name: Option<String> },
Controller(ControllerCommand),
Controller(Box<ControllerCommand>),
}

#[derive(Debug)]
Expand Down
4 changes: 2 additions & 2 deletions example_apps/console/src/model/parse/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -103,9 +103,9 @@ pub fn parse_app_command(command: &str) -> Result<AppCommand, Cow<'static, str>>
}),
["quit"] => Ok(AppCommand::Quit),
["clear"] => Ok(AppCommand::Clear),
_ => Ok(AppCommand::Controller(parse_controller_command(
_ => Ok(AppCommand::Controller(Box::new(parse_controller_command(
command_parts.as_slice(),
)?)),
)?))),
}
}

Expand Down
2 changes: 1 addition & 1 deletion example_apps/console/src/model/parse/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ fn mixed_tokens3() {

fn to_controller(cmd: AppCommand) -> ControllerCommand {
if let AppCommand::Controller(c) = cmd {
c
*c
} else {
panic!("Unexpected command kind.");
}
Expand Down
2 changes: 1 addition & 1 deletion example_apps/console/src/ui/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -434,7 +434,7 @@ fn on_command(
Ok(AppCommand::Clear) => None,
Ok(AppCommand::Controller(command)) => Some(
controller
.perform_action(command)
.perform_action(*command)
.into_iter()
.map(|msg| format!("{}\n", msg))
.map(Cow::Owned)
Expand Down
47 changes: 24 additions & 23 deletions server/swimos_connector_fluvio/src/ingress/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ where
let relays = relays.clone();

Ok(unfold(
ConnectorState::Uninit(configuration.clone(), factory.clone()),
ConnectorState::Uninit(Box::new(configuration.clone()), factory.clone()),
move |state: ConnectorState<F::Client, F>| {
let topic = topic.clone();
let key_deser = key_deser.clone();
Expand All @@ -122,28 +122,29 @@ where

let fut = async move {
match state {
ConnectorState::Uninit(config, factory) => match factory.open(config).await
{
Ok(consumer) => {
let (key, value) =
match load_deserializers(key_deser, value_deser).await {
Ok((key, value)) => (key, value),
Err(e) => {
return Some((
Err(FluvioConnectorError::Configuration(e)),
ConnectorState::Failed,
))
}
};
poll_dispatch(
consumer,
topic,
MessageSelector::new(key, value, lanes, relays),
)
.await
ConnectorState::Uninit(config, factory) => {
match factory.open(*config).await {
Ok(consumer) => {
let (key, value) =
match load_deserializers(key_deser, value_deser).await {
Ok((key, value)) => (key, value),
Err(e) => {
return Some((
Err(FluvioConnectorError::Configuration(e)),
ConnectorState::Failed,
))
}
};
poll_dispatch(
consumer,
topic,
MessageSelector::new(key, value, lanes, relays),
)
.await
}
Err(e) => Some((Err(e), ConnectorState::Failed)),
}
Err(e) => Some((Err(e), ConnectorState::Failed)),
},
}
ConnectorState::Running {
topic,
consumer,
Expand Down Expand Up @@ -185,7 +186,7 @@ where
}

enum ConnectorState<C, F> {
Uninit(FluvioIngressConfiguration, F),
Uninit(Box<FluvioIngressConfiguration>, F),
Running {
topic: String,
consumer: C,
Expand Down
Loading