mirror of
https://github.com/NotAShelf/mpvrc.git
synced 2026-04-17 16:29:50 +00:00
server: use configurable socket path; remove unused import
Signed-off-by: NotAShelf <raf@notashelf.dev> Change-Id: Icf8542f6d43f2a4c6424714886afb8416a6a6964
This commit is contained in:
parent
f3f5b9de93
commit
637dc564fe
2 changed files with 46 additions and 38 deletions
17
src/lib.rs
17
src/lib.rs
|
|
@ -42,12 +42,15 @@
|
|||
pub mod commands;
|
||||
pub mod interactive;
|
||||
|
||||
use serde_json::{Value, json};
|
||||
use std::io;
|
||||
|
||||
use serde_json::{Value, json};
|
||||
use thiserror::Error;
|
||||
use tokio::io::{AsyncReadExt, AsyncWriteExt};
|
||||
use tokio::net::UnixStream;
|
||||
use tracing::{debug, error};
|
||||
use tokio::{
|
||||
io::{AsyncReadExt, AsyncWriteExt},
|
||||
net::UnixStream,
|
||||
};
|
||||
use tracing::debug;
|
||||
|
||||
pub const SOCKET_PATH: &str = "/tmp/mpvsocket";
|
||||
const SOCKET_TIMEOUT_SECS: u64 = 5;
|
||||
|
|
@ -459,10 +462,12 @@ pub async fn loadfile(
|
|||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
use serde_json::json;
|
||||
use std::error::Error;
|
||||
|
||||
use serde_json::json;
|
||||
|
||||
use super::*;
|
||||
|
||||
#[test]
|
||||
fn test_mrc_error_display() {
|
||||
let error = MrcError::InvalidInput("test message".to_string());
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue