Skip to content
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

fix: add back mut ref #2669

Merged
merged 2 commits into from
Oct 31, 2023
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
10 changes: 6 additions & 4 deletions src/cmd/src/frontend.rs
Original file line number Diff line number Diff line change
Expand Up @@ -187,8 +187,9 @@ impl StartCommand {
Ok(Options::Frontend(Box::new(opts)))
}

async fn build(self, opts: FrontendOptions) -> Result<Instance> {
let plugins = plugins::setup_frontend_plugins(&opts)
async fn build(self, mut opts: FrontendOptions) -> Result<Instance> {
#[allow(clippy::unnecessary_mut_passed)]
let plugins = plugins::setup_frontend_plugins(&mut opts)
.await
.context(StartFrontendSnafu)?;

Expand Down Expand Up @@ -303,7 +304,7 @@ mod tests {

#[tokio::test]
async fn test_try_from_start_command_to_anymap() {
let fe_opts = FrontendOptions {
let mut fe_opts = FrontendOptions {
http: HttpOptions {
disable_dashboard: false,
..Default::default()
Expand All @@ -312,7 +313,8 @@ mod tests {
..Default::default()
};

let plugins = plugins::setup_frontend_plugins(&fe_opts).await.unwrap();
#[allow(clippy::unnecessary_mut_passed)]
let plugins = plugins::setup_frontend_plugins(&mut fe_opts).await.unwrap();

let provider = plugins.get::<UserProviderRef>().unwrap();
let result = provider
Expand Down
10 changes: 6 additions & 4 deletions src/cmd/src/standalone.rs
Original file line number Diff line number Diff line change
Expand Up @@ -316,8 +316,9 @@ impl StartCommand {
#[allow(unused_variables)]
#[allow(clippy::diverging_sub_expression)]
async fn build(self, opts: MixOptions) -> Result<Instance> {
let fe_opts = opts.frontend;
let fe_plugins = plugins::setup_frontend_plugins(&fe_opts)
let mut fe_opts = opts.frontend;
#[allow(clippy::unnecessary_mut_passed)]
let fe_plugins = plugins::setup_frontend_plugins(&mut fe_opts)
.await
.context(StartFrontendSnafu)?;

Expand Down Expand Up @@ -421,12 +422,13 @@ mod tests {

#[tokio::test]
async fn test_try_from_start_command_to_anymap() {
let fe_opts = FrontendOptions {
let mut fe_opts = FrontendOptions {
user_provider: Some("static_user_provider:cmd:test=test".to_string()),
..Default::default()
};

let plugins = plugins::setup_frontend_plugins(&fe_opts).await.unwrap();
#[allow(clippy::unnecessary_mut_passed)]
let plugins = plugins::setup_frontend_plugins(&mut fe_opts).await.unwrap();

let provider = plugins.get::<UserProviderRef>().unwrap();
let result = provider
Expand Down
Loading