Skip to content

Commit

Permalink
update the toolchain and dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
dmitmel committed Mar 8, 2022
1 parent f17a17b commit fe444fc
Show file tree
Hide file tree
Showing 7 changed files with 42 additions and 120 deletions.
146 changes: 40 additions & 106 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ homepage = "https://github.com/dmitmel/openkrosskod"
prelude-plus = { path = "crates/prelude-plus", features = ["log", "anyhow"] }

cardboard_coal = { path = "crates/cardboard_coal" }
cardboard_math = { path = "crates/cardboard_math", features = ["serde", "const_fn"] }
cardboard_math = { path = "crates/cardboard_math", features = ["serde"] }
cardboard_oogl = { path = "crates/cardboard_oogl" }
cardboard_utils = { path = "crates/cardboard_utils" }

Expand Down
3 changes: 0 additions & 3 deletions crates/cardboard_math/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,3 @@ cfg-if = "1.0.0"
oorandom = "11.1.3"
getrandom = { version = "0.2.0", features = ["std"] }
serde = { version = "1.0.116", features = ["derive"], optional = true }

[features]
const_fn = []
4 changes: 0 additions & 4 deletions crates/cardboard_math/src/colors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,6 @@ pub type Colorf = Color<f32>;
#[inline(always)]
pub const fn color<T>(r: T, g: T, b: T, a: T) -> Color<T> { Color { r, g, b, a } }

#[cfg(not(feature = "const_fn"))]
#[inline]
pub fn colorn<T: Copy>(n: T, a: T) -> Color<T> { Color { r: n, g: n, b: n, a } }
#[cfg(feature = "const_fn")]
#[inline]
pub const fn colorn<T: Copy>(n: T, a: T) -> Color<T> { Color { r: n, g: n, b: n, a } }

Expand Down
1 change: 0 additions & 1 deletion crates/cardboard_math/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#![cfg_attr(feature = "const_fn", feature(const_fn_trait_bound))]
#![deny(missing_debug_implementations)]
#![allow(clippy::return_self_not_must_use)]

Expand Down
4 changes: 0 additions & 4 deletions crates/cardboard_math/src/vectors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,6 @@ macro_rules! impl_vec_shorthands {
#[inline(always)]
pub const fn $shorthand_name<T>($($field: T),+) -> $VecTy<T> { $VecTy { $($field),+ } }

#[cfg(not(feature = "const_fn"))]
#[inline(always)]
pub fn $n_shorthand_name<T: Copy>(n: T) -> $VecTy<T> { $VecTy { $($field: n),+ } }
#[cfg(feature = "const_fn")]
#[inline(always)]
pub const fn $n_shorthand_name<T: Copy>(n: T) -> $VecTy<T> { $VecTy { $($field: n),+ } }
};
Expand Down
2 changes: 1 addition & 1 deletion rust-toolchain
Original file line number Diff line number Diff line change
@@ -1 +1 @@
nightly-2022-01-14
nightly-2022-03-08

0 comments on commit fe444fc

Please sign in to comment.