Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
charles-r-earp committed Mar 24, 2024
1 parent 516f5a2 commit a3062cf
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 14 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ half = { workspace = true, features = ["std"] }
num-traits = { workspace = true, features = ["std"] }
paste.workspace = true
dry.workspace = true
derive_more = { workspace = true, features = ["unwrap", "deref", "deref_mut"] }
derive_more = { workspace = true, features = ["deref", "deref_mut"] }
thiserror.workspace = true
parking_lot = "0.12.1"
bytemuck.workspace = true
Expand Down
10 changes: 1 addition & 9 deletions src/buffer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -128,14 +128,6 @@ impl RawSlice {
RawSliceInner::Device(buffer) => buffer.device().into(),
}
}
/*#[cfg(feature = "device")]
fn offset(&self) -> usize {
match &self.inner {
RawSliceInner::Host(_) => 0,
#[cfg(feature = "device")]
RawSliceInner::Device(buffer) => buffer.offset(),
}
}*/
fn len(&self) -> usize {
match &self.inner {
RawSliceInner::Host(raw) => raw.len,
Expand Down Expand Up @@ -191,7 +183,7 @@ impl RawSlice {
}
}

#[derive(Clone, derive_more::Unwrap)]
#[derive(Clone)]
enum RawSliceInner {
Host(RawHostSlice),
#[cfg(feature = "device")]
Expand Down
8 changes: 4 additions & 4 deletions src/device.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,12 @@ use std::{
#[cfg(feature = "device")]
use std::{ops::Range, sync::atomic::AtomicBool};

#[cfg(all(not(target_arch = "wasm32"), feature = "device"))]
#[cfg(all(not(target_family = "wasm"), feature = "device"))]
mod vulkan_engine;
#[cfg(all(not(target_arch = "wasm32"), feature = "device"))]
#[cfg(all(not(target_family = "wasm"), feature = "device"))]
use vulkan_engine::Engine;

#[cfg(all(target_arch = "wasm32", feature = "device"))]
#[cfg(all(target_family = "wasm", feature = "device"))]
compile_error!("device feature not supported on wasm");

/// Errors.
Expand Down Expand Up @@ -286,7 +286,7 @@ impl From<RawDevice> for Device {
}
}

#[derive(Clone, Eq, PartialEq, derive_more::Unwrap)]
#[derive(Clone, Eq, PartialEq)]
pub(crate) enum DeviceInner {
Host,
#[cfg(feature = "device")]
Expand Down

0 comments on commit a3062cf

Please sign in to comment.