cargo fix
This commit is contained in:
parent
0fd0f8f5c9
commit
6850da7555
|
|
@ -24,7 +24,6 @@ use proc_macro2::Span;
|
|||
use quote::{ToTokens, quote};
|
||||
use syn::{parse::Parse, parse_macro_input};
|
||||
|
||||
use crate::ref_and_mut::RefAndMut;
|
||||
|
||||
mod all;
|
||||
mod checks;
|
||||
|
|
|
|||
|
|
@ -13,7 +13,6 @@
|
|||
// You should have received a copy of the GNU Affero General Public License
|
||||
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
use core::{
|
||||
fmt::Display,
|
||||
num::NonZeroU8,
|
||||
ops::{Deref, Not},
|
||||
};
|
||||
|
|
@ -30,7 +29,7 @@ use crate::{
|
|||
message::{CharacterIdentity, Identification, PublicIdentity, night::ActionPrompt},
|
||||
player::{PlayerId, RoleChange},
|
||||
role::{
|
||||
Alignment, HunterMut, HunterRef, Killer, KillingWolfOrder, MAPLE_WOLF_ABSTAIN_LIMIT,
|
||||
Alignment, Killer, KillingWolfOrder, MAPLE_WOLF_ABSTAIN_LIMIT,
|
||||
Powerful, PreviousGuardianAction, Role, RoleTitle,
|
||||
},
|
||||
team::Team,
|
||||
|
|
|
|||
|
|
@ -236,7 +236,7 @@ impl axum::response::IntoResponse for ServerError {
|
|||
fn into_response(self) -> axum::response::Response {
|
||||
use axum::{Json, http::StatusCode};
|
||||
|
||||
use crate::cbor::Cbor;
|
||||
|
||||
|
||||
(
|
||||
match self {
|
||||
|
|
|
|||
|
|
@ -29,13 +29,12 @@ use crate::{
|
|||
error::GameError,
|
||||
game::{
|
||||
GameTime, Village,
|
||||
kill::{self, KillOutcome},
|
||||
night::changes::{ChangesLookup, NightChange},
|
||||
},
|
||||
message::{
|
||||
dead::{DeadChat, DeadChatMessage},
|
||||
dead::DeadChat,
|
||||
night::{
|
||||
ActionPrompt, ActionPromptTitle, ActionResponse, ActionResult, ActionType, Visits,
|
||||
ActionPrompt, ActionPromptTitle, ActionResponse, ActionResult, Visits,
|
||||
},
|
||||
},
|
||||
role::RoleTitle,
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@
|
|||
//
|
||||
// You should have received a copy of the GNU Affero General Public License
|
||||
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
use core::{num::NonZeroU8, ops::Not};
|
||||
use core::ops::Not;
|
||||
|
||||
use super::Result;
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
|
|
|||
|
|
@ -15,17 +15,14 @@
|
|||
use core::num::NonZeroU8;
|
||||
|
||||
use crate::{
|
||||
aura::{Aura, AuraTitle},
|
||||
aura::Aura,
|
||||
bag::DrunkRoll,
|
||||
diedto::DiedTo,
|
||||
error::GameError,
|
||||
game::night::{
|
||||
ActionComplete, CurrentResult, Night, NightState, ResponseOutcome, changes::NightChange,
|
||||
},
|
||||
message::{
|
||||
CharacterIdentity,
|
||||
night::{ActionPrompt, ActionResponse, ActionResult, ActionType},
|
||||
},
|
||||
message::night::{ActionPrompt, ActionResponse, ActionResult},
|
||||
player::Protection,
|
||||
role::{
|
||||
Alignment, AlignmentEq, Killer, Powerful, PreviousGuardianAction, RoleBlock, RoleTitle,
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
use core::{num::NonZeroU8, ops::Not};
|
||||
|
||||
use crate::{
|
||||
aura::{Aura, AuraTitle},
|
||||
aura::Aura,
|
||||
diedto::DiedTo,
|
||||
error::GameError,
|
||||
game::{
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
use std::{
|
||||
fs::File,
|
||||
io::{Read, Write},
|
||||
io::Write,
|
||||
};
|
||||
|
||||
const STYLESHEET_PATH: &str = "../style/faction.scss";
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ use leptos_router::{
|
|||
components::{ProtectedRoute, Route, Router, Routes},
|
||||
path,
|
||||
};
|
||||
use leptos_use::storage::{UseStorageOptions, use_local_storage, use_local_storage_with_options};
|
||||
use leptos_use::storage::use_local_storage;
|
||||
use reactive_stores::Store;
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
|
|
@ -29,8 +29,8 @@ use crate::{
|
|||
components::Nav,
|
||||
pages::{GamePage, Main, NotFound, Signin, Signup, UserSettings},
|
||||
storage::{
|
||||
LocalStorage, SessionStorage, Stored,
|
||||
user::{AuthContext, AuthContextStoreFields, PasswordlessUser, UserSession, UserToken},
|
||||
Stored,
|
||||
user::{AuthContext, AuthContextStoreFields},
|
||||
},
|
||||
},
|
||||
state::{InitOrUpdateStore, SessionState},
|
||||
|
|
|
|||
|
|
@ -2,23 +2,19 @@ pub mod big;
|
|||
mod host;
|
||||
mod player;
|
||||
|
||||
use codee::{HybridEncoder, binary::MsgpackSerdeCodec};
|
||||
use codee::binary::MsgpackSerdeCodec;
|
||||
use leptos::prelude::*;
|
||||
use leptos_router::hooks;
|
||||
use leptos_use::{
|
||||
ReconnectLimit, UseEventSourceOptions, UseEventSourceReturn, UseWebSocketOptions,
|
||||
UseWebSocketReturn, core::ConnectionReadyState, use_event_source,
|
||||
use_event_source_with_options, use_websocket, use_websocket_with_options,
|
||||
ReconnectLimit, UseWebSocketOptions,
|
||||
UseWebSocketReturn, core::ConnectionReadyState, use_websocket_with_options,
|
||||
};
|
||||
use reactive_stores::Store;
|
||||
use werewolves_proto::message::{
|
||||
ClientMessage,
|
||||
host::{HostMessage, ServerToHostMessage},
|
||||
};
|
||||
use werewolves_proto::{
|
||||
cbor_leptos::CborEncoding,
|
||||
message::{IntoClientResponse, WrappedServerMessage},
|
||||
host::HostMessage,
|
||||
};
|
||||
use werewolves_proto::message::{IntoClientResponse, WrappedServerMessage};
|
||||
|
||||
use crate::{
|
||||
ConsoleLogError,
|
||||
|
|
|
|||
|
|
@ -1,8 +1,5 @@
|
|||
use leptos::{ev::MouseEvent, prelude::*};
|
||||
use werewolves_proto::{
|
||||
message::{Identification, PlayerState, PublicIdentity},
|
||||
player::PlayerId,
|
||||
};
|
||||
use leptos::prelude::*;
|
||||
use werewolves_proto::message::{Identification, PlayerState};
|
||||
|
||||
use crate::app::components::{Equals, IdentificationInline, Sample, TutorialBox};
|
||||
|
||||
|
|
|
|||
|
|
@ -1,13 +1,13 @@
|
|||
use core::ops::Not;
|
||||
use std::{collections::HashMap, sync::Arc};
|
||||
use std::collections::HashMap;
|
||||
|
||||
use convert_case::{Case, Casing};
|
||||
use leptos::{ev::MouseEvent, prelude::*};
|
||||
use werewolves_proto::{
|
||||
aura::AuraTitle,
|
||||
game::{Category, GameSettings, SetupSlot},
|
||||
message::{PlayerState, host::HostMessage},
|
||||
role::{Role, RoleTitle},
|
||||
message::PlayerState,
|
||||
role::RoleTitle,
|
||||
};
|
||||
|
||||
use crate::app::{
|
||||
|
|
|
|||
|
|
@ -2,19 +2,16 @@ werewolves_macros::include_path!("werewolves/src/app/pages/game/player");
|
|||
|
||||
use core::{
|
||||
hash::Hash,
|
||||
num::{self, NonZeroU8},
|
||||
ops::{Deref, Not},
|
||||
num::NonZeroU8,
|
||||
ops::Deref,
|
||||
};
|
||||
use std::collections::HashSet;
|
||||
|
||||
use convert_case::{Case, Casing};
|
||||
use leptos::{
|
||||
ev::{Event, MouseEvent, SubmitEvent, Targeted},
|
||||
prelude::*,
|
||||
};
|
||||
use leptos::prelude::*;
|
||||
use werewolves_proto::{
|
||||
message::{
|
||||
ClientDeadChat, ClientMessage, ServerToClientMessage as Srv2Client, UpdateSelf,
|
||||
ClientDeadChat, ClientMessage, ServerToClientMessage as Srv2Client,
|
||||
dead::DeadChatMessage,
|
||||
},
|
||||
role::RoleTitle,
|
||||
|
|
|
|||
|
|
@ -3,12 +3,12 @@ use core::ops::Not;
|
|||
use chrono::Utc;
|
||||
use gloo::history::History;
|
||||
use leptos::{ev::MouseEvent, prelude::*};
|
||||
use werewolves_proto::player::{Password, Session, Username};
|
||||
use werewolves_proto::player::{Password, Username};
|
||||
|
||||
use crate::{
|
||||
app::{
|
||||
components::ErrorBox,
|
||||
storage::user::{AuthContext, PasswordlessUser, UserSession, UserToken},
|
||||
storage::user::{AuthContext, UserToken},
|
||||
},
|
||||
auth::Signin,
|
||||
};
|
||||
|
|
|
|||
|
|
@ -3,25 +3,21 @@ use core::ops::Not;
|
|||
use chrono::Utc;
|
||||
use gloo::history::History;
|
||||
use leptos::{
|
||||
ev::{Event, MouseEvent},
|
||||
ev::MouseEvent,
|
||||
prelude::*,
|
||||
};
|
||||
use leptos_meta::*;
|
||||
use rand::distr::SampleString;
|
||||
use reactive_stores::Store;
|
||||
use werewolves_proto::{
|
||||
cbor_leptos::CborPost,
|
||||
error::ServerError,
|
||||
player::{Password, PlayerId, Session, Username},
|
||||
player::{Password, PlayerId, Username},
|
||||
};
|
||||
|
||||
use crate::{
|
||||
app::{
|
||||
components::{ErrorBox, input::TextInput},
|
||||
storage::{
|
||||
LocalStorage,
|
||||
user::{AuthContext, AuthContextStoreFields, PasswordlessUser, UserSession, UserToken},
|
||||
},
|
||||
storage::user::{AuthContext, AuthContextStoreFields, PasswordlessUser, UserToken},
|
||||
},
|
||||
auth::Signin,
|
||||
db::AppState,
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ use core::fmt::Debug;
|
|||
|
||||
use gloo::storage::Storage;
|
||||
use leptos::{
|
||||
prelude::{ArcReadSignal, ArcWriteSignal, Effect, Signal, WriteSignal},
|
||||
prelude::{Signal, WriteSignal},
|
||||
server::codee::string::JsonSerdeCodec,
|
||||
};
|
||||
use serde::{Serialize, de::DeserializeOwned};
|
||||
|
|
|
|||
|
|
@ -1,9 +1,6 @@
|
|||
use chrono::{DateTime, Utc};
|
||||
use leptos::{
|
||||
prelude::{Action, ArcRwSignal, Get, GetUntracked, Set},
|
||||
server::codee::string::JsonSerdeCodec,
|
||||
};
|
||||
use reactive_stores::{Field, Patch, Store};
|
||||
use leptos::prelude::{Action, Get, Set};
|
||||
use reactive_stores::Store;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use werewolves_proto::{
|
||||
limited::FixedLenString,
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ use werewolves_proto::{
|
|||
error::{DatabaseError, ServerError},
|
||||
limited::FixedLenString,
|
||||
player::{Password, ProfileUpdate, Session},
|
||||
token::{self, TOKEN_LEN},
|
||||
token::{self},
|
||||
};
|
||||
|
||||
use crate::db::DatabaseResult;
|
||||
|
|
|
|||
|
|
@ -9,19 +9,13 @@ mod ssr {
|
|||
|
||||
use axum::{
|
||||
body::Body,
|
||||
extract::{FromRef, State},
|
||||
http::{HeaderMap, HeaderValue, Request, StatusCode, Uri, header},
|
||||
extract::State,
|
||||
http::{Request, Uri, header},
|
||||
response::{IntoResponse, Response},
|
||||
};
|
||||
use futures::StreamExt;
|
||||
use leptos::{
|
||||
IntoView,
|
||||
config::LeptosOptions,
|
||||
prelude::{Render, RenderHtml},
|
||||
server_fn::codec::IntoRes,
|
||||
tachys::ssr::StreamBuilder,
|
||||
};
|
||||
use leptos_axum::{LeptosRoutes, ResponseOptions};
|
||||
use leptos::prelude::RenderHtml;
|
||||
|
||||
use werewolves::db::AppState;
|
||||
|
||||
pub async fn server_fn_handler(
|
||||
|
|
@ -38,7 +32,7 @@ mod ssr {
|
|||
}
|
||||
|
||||
pub async fn handle_http_static(
|
||||
uri: Uri,
|
||||
_uri: Uri,
|
||||
state: State<AppState>,
|
||||
req: Request<Body>,
|
||||
) -> Response {
|
||||
|
|
|
|||
|
|
@ -14,20 +14,18 @@
|
|||
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
use core::{net::SocketAddr, str::FromStr};
|
||||
|
||||
use anyhow::anyhow;
|
||||
use axum::{
|
||||
extract::{ConnectInfo, Path, State, WebSocketUpgrade, ws::WebSocket},
|
||||
extract::{ConnectInfo, Path, State, WebSocketUpgrade},
|
||||
response::Response,
|
||||
};
|
||||
use axum_extra::{
|
||||
TypedHeader,
|
||||
headers::{self, Authorization, authorization::Bearer},
|
||||
headers::{self},
|
||||
};
|
||||
use codee::{Decoder, HybridDecoder, HybridEncoder};
|
||||
use codee::HybridDecoder;
|
||||
use colored::Colorize;
|
||||
use futures::FutureExt;
|
||||
use uuid::Uuid;
|
||||
use werewolves_proto::{error::GameError, message::ServerToClientMessage};
|
||||
use werewolves_proto::{
|
||||
error::ServerError, game::GameId, message::WrappedServerMessage, token::TokenString,
|
||||
};
|
||||
|
|
|
|||
|
|
@ -11,7 +11,6 @@ pub mod runner;
|
|||
use core::{
|
||||
fmt::Display,
|
||||
hash::BuildHasherDefault,
|
||||
sync::atomic::{AtomicUsize, Ordering},
|
||||
};
|
||||
use std::{
|
||||
collections::{HashMap, HashSet},
|
||||
|
|
@ -24,7 +23,7 @@ use axum_extra::headers;
|
|||
use colored::Colorize;
|
||||
use tokio::{
|
||||
sync::{
|
||||
Mutex, RwLock,
|
||||
RwLock,
|
||||
broadcast::{self, Receiver, Sender},
|
||||
mpsc::{self, UnboundedSender},
|
||||
},
|
||||
|
|
|
|||
|
|
@ -12,29 +12,15 @@
|
|||
//
|
||||
// You should have received a copy of the GNU Affero General Public License
|
||||
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
use core::{net::SocketAddr, time::Duration};
|
||||
use std::sync::Arc;
|
||||
use core::time::Duration;
|
||||
|
||||
use anyhow::anyhow;
|
||||
use axum::{
|
||||
extract::{
|
||||
ConnectInfo, Path, State, WebSocketUpgrade,
|
||||
ws::{self, Message, WebSocket},
|
||||
},
|
||||
response::Response,
|
||||
};
|
||||
use axum_extra::{
|
||||
TypedHeader,
|
||||
headers::{Authorization, authorization::Bearer},
|
||||
};
|
||||
use axum::extract::ws::{self, Message, WebSocket};
|
||||
use chrono::Utc;
|
||||
use codee::{HybridDecoder, HybridEncoder};
|
||||
use colored::Colorize;
|
||||
use tokio::sync::{broadcast::Receiver, mpsc::UnboundedSender};
|
||||
use werewolves_proto::{
|
||||
LogError,
|
||||
error::ServerError,
|
||||
game::GameId,
|
||||
loc,
|
||||
message::{IntoClientResponse, WrappedServerMessage},
|
||||
};
|
||||
|
|
@ -45,10 +31,7 @@ use werewolves_proto::{
|
|||
|
||||
use crate::{
|
||||
db::{Database, user::User},
|
||||
server::{
|
||||
XForwardedFor,
|
||||
runner::{ClientUpdate, HostOrClientMessage, IdentifiedClientMessage},
|
||||
},
|
||||
server::runner::{ClientUpdate, IdentifiedClientMessage},
|
||||
};
|
||||
|
||||
pub async fn player_handler(
|
||||
|
|
|
|||
|
|
@ -4,7 +4,6 @@ use axum::{
|
|||
response::IntoResponse,
|
||||
};
|
||||
use fast_qr::convert::{Builder, Shape, svg::SvgBuilder};
|
||||
use tower_http::normalize_path::NormalizePath;
|
||||
|
||||
const DEFAULT_BASE_URL: &str = "https://wolf.emilis.dev/";
|
||||
pub const BASE_URL: &str = const {
|
||||
|
|
|
|||
Loading…
Reference in New Issue