diff --git a/CHANGELOG.markdown b/CHANGELOG.markdown index 4849440..2250024 100644 --- a/CHANGELOG.markdown +++ b/CHANGELOG.markdown @@ -1,5 +1,9 @@ # Change Log +## Unreleased + +- MSRV is now **1.54**. We soft-updated to this in 0.8.0 with a feature `min-const-generics`, which has now been removed (and as such, we resume having no default features). + ## [0.8.0] - 2021-09-17 Welcome to the `0.8.0` update. This is one of the largest updates imgui-rs has ever seen; it will generate errors in a `0.7` project, but hopefully it should be both quick to fix, and enjoyable to update. See our [release page](https://github.com/imgui-rs/imgui-rs/releases/tag/v0.8.0) for more information and a list of contributors to this cycle. Thank you to everyone who uses `imgui-rs`, files issues, and spend their time and effort to PR new changes into the codebase. Because of all that effort, this is by far the best `imgui-rs` has looked! diff --git a/imgui/Cargo.toml b/imgui/Cargo.toml index d571142..b2d5e28 100644 --- a/imgui/Cargo.toml +++ b/imgui/Cargo.toml @@ -18,11 +18,8 @@ imgui-sys = { version = "0.8.1-alpha.0", path = "../imgui-sys" } parking_lot = "0.11" [features] -default = ["min-const-generics"] - wasm = ["imgui-sys/wasm"] freetype = ["imgui-sys/freetype"] -min-const-generics = [] # this api is in beta in the upstream imgui crate. See issue #524 for more info. # it should be stable and fine to use though. tables-api = [] diff --git a/imgui/src/tables.rs b/imgui/src/tables.rs index 4909da7..ebd52dd 100644 --- a/imgui/src/tables.rs +++ b/imgui/src/tables.rs @@ -303,7 +303,7 @@ impl<'ui> Ui<'ui> { outer_size: [f32; 2], inner_width: f32, ) -> Option> { - let should_render = unsafe { + unsafe { sys::igBeginTable( self.scratch_txt(str_id), column as i32, @@ -311,13 +311,7 @@ impl<'ui> Ui<'ui> { outer_size.into(), inner_width, ) - }; - - // todo: once msrv is 1.54, convert this to .then(||) - if should_render { - Some(TableToken::new(self)) - } else { - None + .then(|| TableToken::new(self)) } } @@ -325,7 +319,6 @@ impl<'ui> Ui<'ui> { /// /// Takes an array of table header information, the length of which determines /// how many columns will be created. - #[cfg(feature = "min-const-generics")] #[must_use = "if return is dropped immediately, table is ended immediately."] pub fn begin_table_header<'a, Name: AsRef, const N: usize>( &self, @@ -339,7 +332,6 @@ impl<'ui> Ui<'ui> { /// /// Takes an array of table header information, the length of which determines /// how many columns will be created. - #[cfg(feature = "min-const-generics")] #[must_use = "if return is dropped immediately, table is ended immediately."] pub fn begin_table_header_with_flags<'a, Name: AsRef, const N: usize>( &self, @@ -354,7 +346,6 @@ impl<'ui> Ui<'ui> { /// and gives users the most flexibility. /// Takes an array of table header information, the length of which determines /// how many columns will be created. - #[cfg(feature = "min-const-generics")] #[must_use = "if return is dropped immediately, table is ended immediately."] pub fn begin_table_header_with_sizing<'a, Name: AsRef, const N: usize>( &self,