Skip to content

Commit c3422d9

Browse files
committed
Actual merge of master that builds
This fixes some random clippy warnings in master.
1 parent 23658ee commit c3422d9

File tree

5 files changed

+6
-27
lines changed

5 files changed

+6
-27
lines changed

crates/devolutions-pedm/src/api/launch.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
use std::path::{Path, PathBuf};
2-
use std::sync::Arc;
32

43
use aide::NoApi;
54
use axum::extract::State;
65
use axum::{Extension, Json};
7-
use parking_lot::RwLock;
86
use schemars::JsonSchema;
97
use serde::{Deserialize, Serialize};
108
use tracing::info;
@@ -20,10 +18,8 @@ use win_api_wrappers::token::Token;
2018
use win_api_wrappers::utils::{environment_block, expand_environment_path, CommandLine, WideString};
2119

2220
use crate::api::state::AppState;
23-
use crate::db::DbHandle;
2421
use crate::elevator;
2522
use crate::error::Error;
26-
use crate::policy::Policy;
2723

2824
use super::NamedPipeConnectInfo;
2925

crates/devolutions-pedm/src/api/mod.rs

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -178,24 +178,17 @@ pub async fn serve(config: Config, shutdown_signal: ShutdownSignal) -> Result<()
178178
let db = Db::new(&config).await?;
179179
db.setup().await?;
180180

181-
<<<<<<< HEAD
182-
// Update the list of accounts in the database.
181+
let (db_handle, db_async_bridge_task) = DbAsyncBridgeTask::new(db.clone());
182+
let _db_async_bridge_task = devolutions_gateway_task::spawn_task(db_async_bridge_task, shutdown_signal);
183183

184-
// SAFETY: uses `NetUserEnum` and `LookupAccountNameW` from `windows`
184+
// Get the system's accounts and update if needed.
185185
let accounts = list_accounts()?;
186-
187186
let db_accounts = db.get_accounts().await?;
188187
info!("Accounts retrieved successfully");
189188
let diff = diff_accounts(&db_accounts, &accounts);
190189
db.update_accounts(&diff).await?;
191190

192-
let state = AppState::new(db, &config.pipe_name).await?;
193-
=======
194-
let (db_handle, db_async_bridge_task) = DbAsyncBridgeTask::new(db.clone());
195-
let _db_async_bridge_task = devolutions_gateway_task::spawn_task(db_async_bridge_task, shutdown_signal);
196-
197191
let state = AppState::new(db, db_handle, &config.pipe_name).await?;
198-
>>>>>>> origin/master
199192

200193
// a plain Axum router
201194
let hello_router = Router::new().route("/health", axum::routing::get(health_check));

crates/devolutions-pedm/src/db/libsql.rs

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,11 @@ use std::ops::Deref;
88

99
use async_trait::async_trait;
1010
use chrono::{DateTime, Utc};
11-
<<<<<<< HEAD
11+
use devolutions_pedm_shared::policy::ElevationResult;
1212
use futures_util::{StreamExt, TryStreamExt};
1313
use libsql::params::IntoParams;
1414
use libsql::{params, Row, Value};
1515
use tracing::info;
16-
=======
17-
use devolutions_pedm_shared::policy::ElevationResult;
18-
use libsql::params::IntoParams;
19-
use libsql::{params, Row};
20-
>>>>>>> origin/master
2116

2217
use crate::account::{AccountWithId, AccountsDiff, DomainId, Sid};
2318

crates/devolutions-pedm/src/db/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,7 @@ pub(crate) struct DbAsyncBridgeTask {
273273
}
274274

275275
impl DbAsyncBridgeTask {
276-
pub fn new(db: Db) -> (DbHandle, Self) {
276+
pub(crate) fn new(db: Db) -> (DbHandle, Self) {
277277
let (tx, rx) = tokio::sync::mpsc::channel(8);
278278
(DbHandle { tx }, Self { db, rx })
279279
}

crates/devolutions-pedm/src/db/pg.rs

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,8 @@ use async_trait::async_trait;
99
use bb8::Pool;
1010
use bb8_postgres::PostgresConnectionManager;
1111
use chrono::{DateTime, Utc};
12-
<<<<<<< HEAD
13-
use futures_util::try_join;
14-
use tokio_postgres::types::ToSql;
15-
=======
1612
use devolutions_pedm_shared::policy::ElevationResult;
17-
>>>>>>> origin/master
18-
use tokio_postgres::NoTls;
13+
use tokio_postgres::{types::ToSql, NoTls};
1914

2015
use crate::account::{AccountWithId, AccountsDiff, DomainId, Sid};
2116

0 commit comments

Comments
 (0)