Skip to content

Commit

Permalink
refactor: async fn to just fn
Browse files Browse the repository at this point in the history
  • Loading branch information
mrjackwills committed Sep 28, 2022
1 parent a05bf56 commit 17dc604
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/docker_data/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ impl DockerData {
}

/// Update all stats, spawn each container into own tokio::spawn thread
async fn update_all_container_stats(&mut self, all_ids: &[(bool, String)]) {
fn update_all_container_stats(&mut self, all_ids: &[(bool, String)]) {
for (is_running, id) in all_ids.iter() {
let docker = Arc::clone(&self.docker);
let app_data = Arc::clone(&self.app_data);
Expand Down Expand Up @@ -256,7 +256,7 @@ impl DockerData {
}

/// Update all logs, spawn each container into own tokio::spawn thread
async fn init_all_logs(&mut self, all_ids: &[(bool, String)]) {
fn init_all_logs(&mut self, all_ids: &[(bool, String)]) {
for (_, id) in all_ids.iter() {
let docker = Arc::clone(&self.docker);
let timestamps = self.timestamps;
Expand Down Expand Up @@ -293,7 +293,7 @@ impl DockerData {
))
});
};
self.update_all_container_stats(&all_ids).await;
self.update_all_container_stats(&all_ids);
}

/// Animate the loading icon
Expand All @@ -319,10 +319,10 @@ impl DockerData {
let loading_spin = self.loading_spin(loading_uuid).await;

let all_ids = self.update_all_containers().await;
self.update_all_container_stats(&all_ids).await;
self.update_all_container_stats(&all_ids);

// Maybe only do a single one at first?
self.init_all_logs(&all_ids).await;
self.init_all_logs(&all_ids);

if all_ids.is_empty() {
self.initialised = true;
Expand Down

0 comments on commit 17dc604

Please sign in to comment.