This commit is contained in:
Tom Alexander 2022-02-21 23:32:21 -05:00
parent 9100f08f5c
commit 36ff41debe
Signed by: talexander
GPG Key ID: D3A179C9A53C0EDE
4 changed files with 4 additions and 12 deletions

View File

@ -1,5 +1,4 @@
use sqlx::sqlite::SqliteConnectOptions; use sqlx::sqlite::SqliteConnectOptions;
use sqlx::sqlite::SqlitePool;
use sqlx::Connection; use sqlx::Connection;
use sqlx::Row; use sqlx::Row;
use std::{env, str::FromStr}; use std::{env, str::FromStr};
@ -41,9 +40,6 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
.journal_mode(sqlx::sqlite::SqliteJournalMode::Delete), .journal_mode(sqlx::sqlite::SqliteJournalMode::Delete),
) )
.await?; .await?;
// let pool =
// SqlitePool::connect_with(SqliteConnectOptions::from_str(&url)?.create_if_missing(true))
// .await?;
sqlx::migrate!("./migrations").run(&mut dbconn).await?; sqlx::migrate!("./migrations").run(&mut dbconn).await?;
let profiles_created: u64 = sqlx::query(r#"INSERT OR IGNORE INTO profile (name) VALUES (?)"#) let profiles_created: u64 = sqlx::query(r#"INSERT OR IGNORE INTO profile (name) VALUES (?)"#)

View File

@ -1,5 +1,5 @@
use serde::ser::SerializeMap; use serde::ser::SerializeMap;
use serde::{Deserialize, Serialize, Serializer}; use serde::{Serialize, Serializer};
pub struct Command { pub struct Command {
command: Vec<String>, command: Vec<String>,

View File

@ -1,5 +1,5 @@
use bytes::{Buf, BytesMut}; use bytes::{Buf, BytesMut};
use std::io::{self, Cursor}; use std::io::Cursor;
use tokio::{io::AsyncReadExt, net::unix::OwnedReadHalf}; use tokio::{io::AsyncReadExt, net::unix::OwnedReadHalf};
pub struct MpvFramed { pub struct MpvFramed {

View File

@ -1,14 +1,10 @@
use super::command::Command; use super::command::Command;
use super::mpv_framed::MpvFramed; use super::mpv_framed::MpvFramed;
use bytes::BytesMut;
use std::borrow::BorrowMut;
use std::collections::hash_map::Entry; use std::collections::hash_map::Entry;
use std::collections::HashMap; use std::collections::HashMap;
use std::io::Read; use std::path::Path;
use std::os::unix::prelude::OsStrExt;
use std::sync::{Arc, Mutex}; use std::sync::{Arc, Mutex};
use std::{collections::BTreeMap, path::Path}; use tokio::io::AsyncWriteExt;
use tokio::io::{AsyncReadExt, AsyncWriteExt};
use tokio::net::unix::OwnedWriteHalf; use tokio::net::unix::OwnedWriteHalf;
use tokio::net::UnixStream; use tokio::net::UnixStream;
use tokio::sync::mpsc; use tokio::sync::mpsc;