Skip to content

Commit

Permalink
Remove dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
migomipo committed Jun 14, 2024
1 parent 83a82b7 commit f483cb3
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 41 deletions.
35 changes: 0 additions & 35 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,11 @@ build = "src/build.rs"
license = "MIT OR Apache-2.0"

[dependencies]
arr_macro = "0.2.1"
nalgebra = "0.32"
tokio = { version = "1", features = ["net", "time", "macros", "rt-multi-thread", "sync", "fs", "parking_lot"] }
rust-ini = "0.21.0" # INI For configuration
bytes = "1.6"
reqwest = { version = "0.12", default_features=false, features = ["multipart", "rustls-tls"] }
reqwest = { version = "0.12", default-features=false, features = ["multipart", "rustls-tls"] }
tracing = "0.1"
tracing-subscriber = {version="0.3", features = ["parking_lot"]}
tracing-appender = "0.2"
Expand Down
3 changes: 1 addition & 2 deletions src/game.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ use nalgebra::{point, Matrix3, Point3, Rotation3, Unit, Vector2, Vector3};

use crate::game::RinkSideOfLine::{BlueSide, On, RedSide};
use crate::protocol::{PuckPacket, SkaterPacket};
use arr_macro::arr;
use std::f32::consts::PI;
use std::fmt;
use std::fmt::{Display, Formatter};
Expand Down Expand Up @@ -587,7 +586,7 @@ impl Puck {
}

pub(crate) fn get_puck_vertices(&self) -> [Point3<f32>; 48] {
let mut res = arr![point![0.0, 0.0, 0.0]; 48];
let mut res = [const { point![0.0, 0.0, 0.0] }; 48];
for i in 0..16 {
let (sin, cos) = ((i as f32) * PI / 8.0).sin_cos();
for j in -1..=1 {
Expand Down
3 changes: 1 addition & 2 deletions src/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ use std::rc::Rc;
use std::sync::Arc;
use std::time::{Duration, Instant};

use arr_macro::arr;
use arraydeque::{ArrayDeque, Wrapping};
use async_stream::stream;
use bytes::{BufMut, BytesMut};
Expand Down Expand Up @@ -1238,7 +1237,7 @@ impl HQMServer {
}

fn get_packets(&self) -> [ObjectPacket; 32] {
let mut packets = arr![ObjectPacket::None; 32];
let mut packets = [const { ObjectPacket::None }; 32];
for (i, puck) in self.state.pucks.iter().enumerate() {
if let Some(puck) = puck {
packets[i] = ObjectPacket::Puck(puck.get_packet())
Expand Down

0 comments on commit f483cb3

Please sign in to comment.