Skip to content

Commit

Permalink
Removed unnecessary PhantomData
Browse files Browse the repository at this point in the history
  • Loading branch information
DoctorWhoof committed Nov 11, 2024
1 parent a19b59a commit 8c3ca48
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "slice_map"
version = "0.2.1"
version = "0.2.2"
edition = "2021"
description = "A generic container to store a single type of data into unevenly sized slices."
repository = "https://github.com/DoctorWhoof/slice_map.git"
Expand Down
5 changes: 1 addition & 4 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ pub(crate) mod test;
pub type ResultOrStr<T> = Result<T, &'static str>;
pub type Slice = core::ops::Range<u32>;

use core::{marker::PhantomData, ops::Range};
use core::ops::Range;
use slotmap::{basic::Values, SlotMap};

extern crate alloc;
Expand All @@ -28,7 +28,6 @@ slotmap::new_key_type! {
pub struct SliceMap<V> {
pub(crate) items: Vec<V>, // Generic items
pub(crate) slices: SlotMap<SliceKey, Slice>, // Ranges that map to individual item slices
_marker_values: PhantomData<V>,
}

impl<V> SliceMap<V> {
Expand All @@ -37,7 +36,6 @@ impl<V> SliceMap<V> {
Self {
items: Vec::new(),
slices: SlotMap::with_key(),
_marker_values: PhantomData,
}
}

Expand All @@ -46,7 +44,6 @@ impl<V> SliceMap<V> {
Self {
items: Vec::with_capacity(cap),
slices: SlotMap::with_key(),
_marker_values: PhantomData,
}
}

Expand Down

0 comments on commit 8c3ca48

Please sign in to comment.