Skip to content

Commit

Permalink
clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
jonaro00 committed Aug 2, 2024
1 parent 7f3e616 commit d7dff14
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 6 deletions.
4 changes: 2 additions & 2 deletions cargo-shuttle/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -641,7 +641,7 @@ impl Shuttle {
if should_create_environment {
// Set the project working directory path to the init path,
// so `load_project` is ran with the correct project path
project_args.working_directory = path.clone();
project_args.working_directory.clone_from(&path);

self.load_project(&project_args)?;
self.project_start(DEFAULT_IDLE_MINUTES).await?;
Expand Down Expand Up @@ -1881,7 +1881,7 @@ impl Shuttle {
dunce::canonicalize(runtime_executable).context("canonicalize path of executable")?,
)
.current_dir(&service.workspace_path)
.args(&["--run"])
.args(["--run"])
.envs([
("SHUTTLE_BETA", "true"),
("SHUTTLE_PROJECT_ID", "proj_LOCAL"),
Expand Down
2 changes: 1 addition & 1 deletion cargo-shuttle/src/provisioner_server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -589,7 +589,7 @@ pub mod beta {
.await
.context("Failed to start Docker container. Make sure that a Docker engine is running.")?;
ShuttleResourceOutput {
output: serde_json::to_value(&res).unwrap(),
output: serde_json::to_value(res).unwrap(),
custom: serde_json::Value::Null,
state: Some(resource::ResourceState::Ready),
}
Expand Down
4 changes: 2 additions & 2 deletions gateway/src/project.rs
Original file line number Diff line number Diff line change
Expand Up @@ -732,15 +732,15 @@ pub async fn refresh_with_retry(
let mut proj = Box::new(project);

loop {
let refreshed = proj.refresh(ctx).await;
let refreshed = proj.clone().refresh(ctx).await;
match refreshed.as_ref() {
Ok(Project::Errored(err)) => match &err.ctx {
Some(err_ctx) => {
if num_attempt >= max_attempt {
return refreshed;
} else {
num_attempt += 1;
proj = err_ctx.clone();
proj.clone_from(err_ctx);
tokio::time::sleep(Duration::from_millis(100_u64 * 2_u64.pow(num_attempt)))
.await
}
Expand Down
4 changes: 3 additions & 1 deletion resource-recorder/tests/integration.rs
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,9 @@ async fn manage_resources() {
"should update last_updated"
);

service_db.last_updated = response.resources[1].last_updated.clone();
service_db
.last_updated
.clone_from(&response.resources[1].last_updated);

let expected = ResourcesResponse {
success: true,
Expand Down

0 comments on commit d7dff14

Please sign in to comment.