diff --git a/Cargo.toml b/Cargo.toml index bcef6f2..be9ba3c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "kushi" -version = "0.1.1" +version = "0.1.2" license = "MIT OR Apache-2.0" description = "A queue built for the Dango Music Player and Oden Music Bot" homepage = "https://github.com/Dangoware/kushi-queue" diff --git a/src/lib.rs b/src/lib.rs index 236ef57..4e67e5f 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,10 +1,11 @@ use std::fmt::Debug; use error::QueueError; -use traits::{Location, TrackGroup}; + pub mod error; -pub mod traits; + +pub trait Location {} #[derive(Debug, PartialEq, Clone, Copy)] pub enum QueueState { @@ -18,7 +19,7 @@ pub enum QueueState { #[non_exhaustive] pub struct QueueItem< T: Debug + Clone + PartialEq, // T: The Singular Item Type - U: Debug + PartialEq + Clone + TrackGroup, // U: The Multi-Item Type. Needs to be tracked as multiple items + U: Debug + PartialEq + Clone + IntoIterator, // U: an Iterator L: Debug + PartialEq + Clone + Copy + Location // L: The Location Type. Optional but maybe useful > { pub item: QueueItemType, @@ -31,7 +32,7 @@ pub struct QueueItem< #[non_exhaustive] pub enum QueueItemType< T: Debug + Clone + PartialEq, // T: The Singular Item Type - U: Debug + PartialEq + Clone + TrackGroup, // U: The Multi-Item Type. Needs to be tracked as multiple items + U: Debug + PartialEq + Clone + IntoIterator, // U: The Multi-Item Type. Needs to be tracked as multiple items > { Single(T), Multi(U) @@ -39,7 +40,7 @@ pub enum QueueItemType< impl< T: Debug + Clone + PartialEq, // T: The Singular Item Type - U: Debug + PartialEq + Clone + TrackGroup, // U: The Multi-Item Type. Needs to be tracked as multiple items + U: Debug + PartialEq + Clone + IntoIterator, // U: The Multi-Item Type. Needs to be tracked as multiple items > QueueItemType { pub fn from_single(item: T) -> Self { QueueItemType::Single(item) @@ -53,7 +54,7 @@ impl< impl< T: Debug + Clone + PartialEq, - U: Debug + PartialEq + Clone + TrackGroup, + U: Debug + PartialEq + Clone + IntoIterator, L: Debug + PartialEq + Clone + Copy + Location > QueueItem { @@ -70,7 +71,7 @@ QueueItem { #[derive(Debug, Default)] pub struct Queue< T: Debug + Clone + PartialEq, // T: The Singular Item Type - U: Debug + PartialEq + Clone + TrackGroup, // U: The Multi-Item Type. Needs to be tracked as multiple items + U: Debug + PartialEq + Clone + IntoIterator, // U: The Multi-Item Type. Needs to be tracked as multiple items L: Debug + PartialEq + Clone + Copy + Location // L: The Location Type. Optional but maybe useful > { pub items: Vec>, @@ -82,7 +83,7 @@ pub struct Queue< // TODO: HAndle the First QueueState[looping] and shuffle impl< T: Debug + Clone + PartialEq, - U: Debug + PartialEq + Clone + TrackGroup, + U: Debug + PartialEq + Clone + IntoIterator, L: Debug + PartialEq + Clone + Copy + Location > Queue { fn has_addhere(&self) -> bool { diff --git a/src/traits.rs b/src/traits.rs deleted file mode 100644 index 306fc19..0000000 --- a/src/traits.rs +++ /dev/null @@ -1,3 +0,0 @@ -pub trait TrackGroup {} - -pub trait Location {} \ No newline at end of file