cleaned up unused rust types

This commit is contained in:
2026-03-10 03:39:59 +08:00
parent ceaa1257bf
commit a4d8601297
3 changed files with 2 additions and 19 deletions

View File

@@ -12,10 +12,7 @@ use crate::{
},
interaction::{InteractionDeliveryFailedDto, InteractionPayloadDto},
},
services::{
cursor::CursorPositions, friend_cursor::FriendCursorPositionsDto,
ws::OutgoingFriendCursorPayload,
},
services::{cursor::CursorPositions, friend_cursor::FriendCursorPositionsDto},
};
#[derive(Debug, Clone, Serialize, Deserialize, Type, Event)]
@@ -50,10 +47,6 @@ pub struct CreateDoll;
#[tauri_specta(event_name = "user-status-changed")]
pub struct UserStatusChanged(pub UserStatusPayload);
#[derive(Debug, Clone, Serialize, Deserialize, Type, Event)]
#[tauri_specta(event_name = "friend-cursor-position")]
pub struct FriendCursorPositionUpdated(pub OutgoingFriendCursorPayload);
#[derive(Debug, Clone, Serialize, Deserialize, Type, Event)]
#[tauri_specta(event_name = "friend-cursor-positions")]
pub struct FriendCursorPositionsUpdated(pub FriendCursorPositionsDto);

View File

@@ -29,5 +29,4 @@ pub mod client;
// Re-export public API
pub use cursor::report_cursor_data;
pub use emitter::ws_emit_soft;
pub use types::OutgoingFriendCursorPayload;
pub use types::WS_EVENT;

View File

@@ -1,5 +1,4 @@
use serde::{Deserialize, Serialize};
use specta::Type;
use serde::Deserialize;
/// WebSocket event constants
#[allow(non_camel_case_types)]
@@ -36,11 +35,3 @@ pub struct IncomingFriendCursorPayload {
pub user_id: String,
pub position: crate::services::cursor::CursorPosition,
}
/// Outgoing friend cursor position to frontend
#[derive(Clone, Debug, Serialize, Deserialize, Type)]
#[serde(rename_all = "camelCase")]
pub struct OutgoingFriendCursorPayload {
pub user_id: String,
pub position: crate::services::cursor::CursorPositions,
}