Skip to content

Commit 0ba7c4f

Browse files
committed
format
1 parent 57f04ac commit 0ba7c4f

File tree

3 files changed

+11
-9
lines changed

3 files changed

+11
-9
lines changed

pgml-dashboard/src/guards.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ use rocket::request::{FromRequest, Outcome, Request};
55
use rocket::State;
66
use sqlx::PgPool;
77

8-
use crate::{Clusters, Context, models};
8+
use crate::{models, Clusters, Context};
99

1010
pub fn default_database_url() -> String {
1111
match var("DATABASE_URL") {

pgml-dashboard/src/lib.rs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ use std::sync::Arc;
66

77
use parking_lot::Mutex;
88
use rocket::form::Form;
9-
use rocket::State;
109
use rocket::response::Redirect;
1110
use rocket::route::Route;
11+
use rocket::State;
1212
use sailfish::TemplateOnce;
1313
use sqlx::{postgres::PgPoolOptions, PgPool};
1414

@@ -118,8 +118,7 @@ impl Clusters {
118118
}
119119
}
120120

121-
122-
// Globally shared state in memory.
121+
// Globally shared state in memory.
123122

124123
#[derive(Debug, Clone)]
125124
pub struct CurrentUser {
@@ -151,8 +150,8 @@ impl CurrentUser {
151150

152151
pub fn new() -> CurrentUser {
153152
CurrentUser {
154-
user: Arc::new(Mutex::new( None )),
155-
visible_clusters: Arc::new(Mutex::new(None )),
153+
user: Arc::new(Mutex::new(None)),
154+
visible_clusters: Arc::new(Mutex::new(None)),
156155
}
157156
}
158157
}

pgml-dashboard/src/main.rs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -132,9 +132,12 @@ async fn main() {
132132
)
133133
.unwrap();
134134

135-
clusters.set_context(-1, pgml_dashboard::Context {
136-
cluster: Some(pgml_dashboard::models::Cluster::default())
137-
});
135+
clusters.set_context(
136+
-1,
137+
pgml_dashboard::Context {
138+
cluster: Some(pgml_dashboard::models::Cluster::default()),
139+
},
140+
);
138141

139142
pgml_dashboard::migrate(&clusters.get(-1).unwrap())
140143
.await

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy