Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions tests/bench.rs → benches/bench.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ use kaolin::{
};
use test::{Bencher, black_box};

#[path = "../tests/common.rs"]
mod common;
use common::*;

Expand Down
5 changes: 4 additions & 1 deletion src/commands.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,12 @@ use alloc::{collections::VecDeque, string::String};

use crate::{elements::flexbox::FlexBox, style::border};

/// Placeholder for when [RenderCommand::Custom] isn't used.
pub enum Nothing {}

/// A single rendering command.
#[derive(Debug, Clone)]
pub enum RenderCommand<Color, CustomData = !>
pub enum RenderCommand<Color, CustomData = Nothing>
where
Color: Default + Copy + PartialEq + crate::style::KaolinColor,
{
Expand Down
3 changes: 2 additions & 1 deletion src/elements/traits.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
use alloc::boxed::Box;

use crate::commands::Nothing;
use crate::elements::KaolinNode;
use crate::elements::RenderCommand;
use crate::style::sizing::PreferredSize;
Expand All @@ -14,7 +15,7 @@ use crate::style::sizing::SizingDimensions;
/// although that data will need to be consistent across all elements for a specific renderer.
///
/// For elements that can contain other elements, also implement the [`KaolinContainerElement`] trait.
pub trait KaolinElement<'frame, Color, CustomData = !>
pub trait KaolinElement<'frame, Color, CustomData = Nothing>
where
Color: Default + Copy + PartialEq + crate::style::KaolinColor,
{
Expand Down
1 change: 0 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#![feature(never_type)]
#![no_std]
#[doc = include_str!("../README.md")]
extern crate alloc;
Expand Down