Change rust edition from 2021 -> 2024
This commit is contained in:
2
Cargo.lock
generated
2
Cargo.lock
generated
@@ -847,7 +847,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "mpvipc-async"
|
||||
version = "0.1.0"
|
||||
source = "git+https://git.pvv.ntnu.no/Grzegorz/mpvipc-async.git?branch=main#0934dba9a5d1a7ab832605d2781f43625f25bfad"
|
||||
source = "git+https://git.pvv.ntnu.no/Grzegorz/mpvipc-async.git?branch=main#c4b77dd1987e5ad02a9365cb157f76ca986371f8"
|
||||
dependencies = [
|
||||
"futures",
|
||||
"log",
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
[package]
|
||||
name = "greg-ng"
|
||||
version = "0.1.0"
|
||||
edition = "2021"
|
||||
edition = "2024"
|
||||
license = "GPL-3.0"
|
||||
authors = ["projects@pvv.ntnu.no"]
|
||||
readme = "README.md"
|
||||
|
||||
1
rustfmt.toml
Normal file
1
rustfmt.toml
Normal file
@@ -0,0 +1 @@
|
||||
style_edition = "2024"
|
||||
@@ -2,7 +2,7 @@ use mpvipc_async::{
|
||||
LoopProperty, Mpv, MpvExt, NumberChangeOptions, PlaylistAddOptions, PlaylistAddTypeOptions,
|
||||
SeekOptions, Switch,
|
||||
};
|
||||
use serde_json::{json, Value};
|
||||
use serde_json::{Value, json};
|
||||
|
||||
/// Add item to playlist
|
||||
pub async fn loadfile(mpv: Mpv, path: &str) -> anyhow::Result<()> {
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
use axum::{
|
||||
Json, Router,
|
||||
extract::{Query, State},
|
||||
http::StatusCode,
|
||||
response::{IntoResponse, Response},
|
||||
routing::{delete, get, post},
|
||||
Json, Router,
|
||||
};
|
||||
use mpvipc_async::Mpv;
|
||||
use serde_json::{json, Value};
|
||||
use serde_json::{Value, json};
|
||||
|
||||
use utoipa::OpenApi;
|
||||
use utoipa_axum::{router::OpenApiRouter, routes};
|
||||
|
||||
@@ -4,23 +4,23 @@ use std::{
|
||||
};
|
||||
|
||||
use anyhow::Context;
|
||||
use futures::{stream::FuturesUnordered, StreamExt};
|
||||
use futures::{StreamExt, stream::FuturesUnordered};
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
use axum::{
|
||||
Router,
|
||||
extract::{
|
||||
ws::{Message, WebSocket},
|
||||
ConnectInfo, State, WebSocketUpgrade,
|
||||
ws::{Message, WebSocket},
|
||||
},
|
||||
response::IntoResponse,
|
||||
routing::any,
|
||||
Router,
|
||||
};
|
||||
use mpvipc_async::{
|
||||
LoopProperty, Mpv, MpvExt, NumberChangeOptions, Playlist, PlaylistAddTypeOptions, SeekOptions,
|
||||
Switch,
|
||||
};
|
||||
use serde_json::{json, Value};
|
||||
use serde_json::{Value, json};
|
||||
use tokio::{
|
||||
select,
|
||||
sync::{mpsc, watch},
|
||||
|
||||
Reference in New Issue
Block a user