File tree 3 files changed +11
-9
lines changed
Filter options
3 files changed +11
-9
lines changed
Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ use rocket::request::{FromRequest, Outcome, Request};
5
5
use rocket:: State ;
6
6
use sqlx:: PgPool ;
7
7
8
- use crate :: { Clusters , Context , models } ;
8
+ use crate :: { models , Clusters , Context } ;
9
9
10
10
pub fn default_database_url ( ) -> String {
11
11
match var ( "DATABASE_URL" ) {
Original file line number Diff line number Diff line change @@ -6,9 +6,9 @@ use std::sync::Arc;
6
6
7
7
use parking_lot:: Mutex ;
8
8
use rocket:: form:: Form ;
9
- use rocket:: State ;
10
9
use rocket:: response:: Redirect ;
11
10
use rocket:: route:: Route ;
11
+ use rocket:: State ;
12
12
use sailfish:: TemplateOnce ;
13
13
use sqlx:: { postgres:: PgPoolOptions , PgPool } ;
14
14
@@ -118,8 +118,7 @@ impl Clusters {
118
118
}
119
119
}
120
120
121
-
122
- // Globally shared state in memory.
121
+ // Globally shared state in memory.
123
122
124
123
#[ derive( Debug , Clone ) ]
125
124
pub struct CurrentUser {
@@ -151,8 +150,8 @@ impl CurrentUser {
151
150
152
151
pub fn new ( ) -> CurrentUser {
153
152
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 ) ) ,
156
155
}
157
156
}
158
157
}
Original file line number Diff line number Diff line change @@ -132,9 +132,12 @@ async fn main() {
132
132
)
133
133
. unwrap ( ) ;
134
134
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
+ ) ;
138
141
139
142
pgml_dashboard:: migrate ( & clusters. get ( -1 ) . unwrap ( ) )
140
143
. await
You can’t perform that action at this time.
0 commit comments