Change rust edition from 2021 -> 2024

This commit is contained in:
2025-12-15 09:52:58 +09:00
parent 56aa8abd03
commit 7bf66fdc44
6 changed files with 10 additions and 9 deletions

2
Cargo.lock generated
View File

@@ -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",

View File

@@ -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
View File

@@ -0,0 +1 @@
style_edition = "2024"

View File

@@ -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<()> {

View File

@@ -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};

View File

@@ -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},