🗑️ Code cleanup

This commit is contained in:
Lucy 2022-07-06 15:32:21 -04:00
parent 5bf43a72af
commit a0091235a4
No known key found for this signature in database
GPG key ID: EBC517FAD666BBF1
2 changed files with 15 additions and 62 deletions

View file

@ -9,7 +9,7 @@ mod process;
use async_signals::Signals;
use color_eyre::{eyre::WrapErr, Result};
use futures_util::StreamExt;
use tokio::sync::{mpsc, oneshot};
use tokio::sync::mpsc;
use tokio_util::sync::CancellationToken;
use tracing::metadata::LevelFilter;
use tracing_subscriber::{fmt, prelude::*, EnvFilter};
@ -31,19 +31,15 @@ async fn main() -> Result<()> {
info!("Starting cosmic-session");
let token = CancellationToken::new();
let (env_tx, env_rx) = oneshot::channel();
let (socket_tx, socket_rx) = mpsc::unbounded_channel();
tokio::spawn({
let token = token.child_token();
async move {
if let Err(err) = comp::run_compositor(token, socket_rx, env_tx).await {
if let Err(err) = comp::run_compositor(token, socket_rx).await {
error!("compositor errored: {:?}", err);
}
}
});
// let env_vars = env_rx
// .await
// .expect("failed to receive environmental variables");
tokio::time::sleep(std::time::Duration::from_millis(100)).await;
let env_vars = Vec::new();
info!("got environmental variables: {:?}", env_vars);