Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 0ba7c4f

Browse filesBrowse files
committed
format
1 parent 57f04ac commit 0ba7c4f
Copy full SHA for 0ba7c4f

File tree

3 files changed

+11
-9
lines changed
Filter options

3 files changed

+11
-9
lines changed

‎pgml-dashboard/src/guards.rs

Copy file name to clipboardExpand all lines: pgml-dashboard/src/guards.rs
+1-1Lines 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

Copy file name to clipboardExpand all lines: pgml-dashboard/src/lib.rs
+4-5Lines 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

Copy file name to clipboardExpand all lines: pgml-dashboard/src/main.rs
+6-3Lines 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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.