瀏覽代碼

Removed Point

Point dynamically excepts Integer generic, this means Data::Point would
require a generic Variant of an enum... which I don't think Rust would
allow (Boy that gets messy, just sounds messy)

Anyhow :)
Apollo 3 周之前
父節點
當前提交
e504c8a0a0
共有 2 個文件被更改,包括 0 次插入62 次删除
  1. 0 2
      Cargo.toml
  2. 0 60
      src/data.rs

+ 0 - 2
Cargo.toml

@@ -6,10 +6,8 @@ edition = "2021"
 [features]
 cast_into = []
 serde = ["dep:serde"]
-point = ["serde", "dep:point"]
 
 [dependencies]
 tokio = { version = "1.40.0", features = ["macros", "rt", "rt-multi-thread", "sync", "time"] }
 serde = { version = "1.0", features = ["derive"], optional = true}
-point = { git = "https://git.red-green.com/david/point", version = "0.1.5", optional = true }
 

+ 0 - 60
src/data.rs

@@ -3,7 +3,6 @@ use std::{collections::HashMap, fmt::Display, slice::{SliceIndex, Iter, IterMut}
 use crate::Shared;
 
 #[cfg(not(feature = "serde"))]
-#[cfg(not(feature = "point"))]
 #[derive(Debug, PartialEq, Clone)]
 pub enum Data {
     None,
@@ -26,7 +25,6 @@ pub enum Data {
 }
 
 #[cfg(feature="serde")]
-#[cfg(not(feature = "point"))]
 #[derive(Debug, PartialEq, Clone, serde::Serialize, serde::Deserialize)]
 pub enum Data {
     None,
@@ -48,64 +46,6 @@ pub enum Data {
     Map(HashMap<String, Data>),
 }
 
-#[cfg(not(feature = "serde"))]
-#[cfg(feature = "point")]
-#[derive(Debug, PartialEq, Clone)]
-pub enum Data {
-    None,
-    String(String),
-    I8(i8),
-    I16(i16),
-    I32(i32),
-    I64(i64),
-    I128(i128),
-    U8(u8),
-    U16(u16),
-    U32(u32),
-    U64(u64),
-    U128(u128),
-    F32(f32),
-    F64(f64),
-    Bool(bool),
-    Vec(Vec<Data>),
-    Map(HashMap<String, Data>),
-    PI32(Point<i32>),
-    PI64(Point<i64>),
-    PI128(Point<i128>),
-    PU32(Point<u32>),
-    PU64(Point<u64>),
-    PU128(Point<u128>),
-}
-
-#[cfg(feature="serde")]
-#[cfg(feature = "point")]
-#[derive(Debug, PartialEq, Clone, serde::Serialize, serde::Deserialize)]
-pub enum Data {
-    None,
-    String(String),
-    I8(i8),
-    I16(i16),
-    I32(i32),
-    I64(i64),
-    I128(i128),
-    U8(u8),
-    U16(u16),
-    U32(u32),
-    U64(u64),
-    U128(u128),
-    F32(f32),
-    F64(f64),
-    Bool(bool),
-    Vec(Vec<Data>),
-    Map(HashMap<String, Data>),
-    PI32(Point<i32>),
-    PI64(Point<i64>),
-    PI128(Point<i128>),
-    PU32(Point<u32>),
-    PU64(Point<u64>),
-    PU128(Point<u128>),
-}
-
 impl Default for Data {
     fn default() -> Self {
         Self::None