Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump MSRV to 1.64 #718

Merged
merged 5 commits into from
Mar 22, 2023
Merged
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
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:

strategy:
matrix:
rust: ["1.60"]
rust: ["1.64"]

env:
RUSTFLAGS: -D warnings
Expand Down Expand Up @@ -81,7 +81,7 @@ jobs:
matrix:
rust:
- stable
- "1.60"
- "1.64"
os:
- ubuntu-latest
- macos-latest
Expand Down
2 changes: 1 addition & 1 deletion README.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ be applicable to usage with any backend/renderer.

## Minimum Support Rust Version (MSRV)

The MSRV for `imgui-rs` and all of the backend crates is **1.60**. We update our MSRV periodically, and issue a minor bump for it.
The MSRV for `imgui-rs` and all of the backend crates is **1.64**. We update our MSRV periodically, and issue a minor bump for it.

## Choosing a backend platform and a renderer

Expand Down
2 changes: 1 addition & 1 deletion imgui-glow-renderer/src/versions.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#![allow(clippy::must_use_candidate)]

#[derive(PartialEq, Clone, Copy)]
#[derive(PartialEq, Clone, Copy, Eq)]
pub struct GlVersion {
pub major: u16,
pub minor: u16,
Expand Down
2 changes: 1 addition & 1 deletion imgui-winit-glow-renderer-viewports/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -480,7 +480,7 @@ impl Renderer {
winit::event::WindowEvent::Moved(_) => unsafe {
let new_pos = window.inner_position().unwrap().cast::<f32>();
(*(viewport.platform_user_data.cast::<ViewportData>())).pos =
[new_pos.x as f32, new_pos.y as f32];
[new_pos.x, new_pos.y];

viewport.platform_request_move = true;
},
Expand Down
2 changes: 1 addition & 1 deletion imgui/src/input_widget.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1268,7 +1268,7 @@ extern "C" fn callback<T: InputTextCallbackHandler>(
}
InputTextFlags::CALLBACK_HISTORY => {
let key = unsafe {
let key = (*data).EventKey as u32;
let key = (*data).EventKey;
match key {
sys::ImGuiKey_UpArrow => HistoryDirection::Up,
sys::ImGuiKey_DownArrow => HistoryDirection::Down,
Expand Down
4 changes: 2 additions & 2 deletions imgui/src/stacks.rs
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ impl Ui {
}

/// A temporary change in item flags
#[derive(Copy, Clone, Debug, PartialEq)]
#[derive(Copy, Clone, Debug, PartialEq, Eq)]
pub enum ItemFlag {
AllowKeyboardFocus(bool),
ButtonRepeat(bool),
Expand Down Expand Up @@ -376,7 +376,7 @@ impl IdStackToken<'_> {
}

/// # ID stack
impl<'ui> Ui {
impl Ui {
/// Pushes an identifier to the ID stack.
///
/// Returns an `IdStackToken` that can be popped by calling `.end()`
Expand Down
2 changes: 1 addition & 1 deletion imgui/src/string.rs
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ impl ImString {
}
}

impl<'a> Default for ImString {
impl Default for ImString {
#[inline]
fn default() -> ImString {
ImString(vec![b'\0'])
Expand Down
4 changes: 2 additions & 2 deletions imgui/src/tables.rs
Original file line number Diff line number Diff line change
Expand Up @@ -482,7 +482,7 @@ impl Ui {
pub fn table_set_column_index(&self, column_index: usize) -> bool {
#[cfg(debug_assertions)]
{
let size = self.table_column_count() as usize;
let size = self.table_column_count();
if column_index >= size {
panic!(
"column_index >= self.table_get_column_count().\
Expand Down Expand Up @@ -760,7 +760,7 @@ pub struct TableColumnSetup<Name> {
pub user_id: Id,
}

impl<'a, Name: AsRef<str>> TableColumnSetup<Name> {
impl<Name: AsRef<str>> TableColumnSetup<Name> {
pub fn new(name: Name) -> Self {
Self {
name,
Expand Down
4 changes: 2 additions & 2 deletions imgui/src/tokens.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@ macro_rules! create_token {
) => {
#[must_use]
$(#[$struct_meta])*
pub struct $token_name<'a>($crate::__core::marker::PhantomData<&'a crate::Ui>);
pub struct $token_name<'a>($crate::__core::marker::PhantomData<&'a $crate::Ui>);

impl<'a> $token_name<'a> {
/// Creates a new token type.
pub(crate) fn new(_: &'a crate::Ui) -> Self {
pub(crate) fn new(_: &'a $crate::Ui) -> Self {
Self(std::marker::PhantomData)
}

Expand Down
2 changes: 1 addition & 1 deletion imgui/src/window/scroll.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use crate::sys;
use crate::Ui;

/// # Window scrolling
impl<'ui> Ui {
impl Ui {
/// Returns the horizontal scrolling position.
///
/// Value is between 0.0 and self.scroll_max_x().
Expand Down
14 changes: 7 additions & 7 deletions xtask/src/bindgen.rs
Original file line number Diff line number Diff line change
Expand Up @@ -131,22 +131,22 @@ fn generate_binding_file(
"--use-core",
];
cmd.args(a);
cmd.args(&["--blocklist-type", "__darwin_size_t"]);
cmd.args(&["--raw-line", "#![allow(nonstandard_style, clippy::all)]"]);
cmd.args(["--blocklist-type", "__darwin_size_t"]);
cmd.args(["--raw-line", "#![allow(nonstandard_style, clippy::all)]"]);
cmd.arg("--output").arg(output);
cmd.args(&["--ctypes-prefix", "cty"]);
cmd.args(["--ctypes-prefix", "cty"]);

if let Some(name) = wasm_import_mod {
cmd.args(&["--wasm-import-module-name", name]);
cmd.args(["--wasm-import-module-name", name]);
}
for t in types {
cmd.args(&["--allowlist-type", t]);
cmd.args(["--allowlist-type", t]);
}
for f in funcs {
cmd.args(&["--allowlist-function", f]);
cmd.args(["--allowlist-function", f]);
}
cmd.arg(header);
cmd.args(&["--", "-DCIMGUI_DEFINE_ENUMS_AND_STRUCTS=1"]);
cmd.args(["--", "-DCIMGUI_DEFINE_ENUMS_AND_STRUCTS=1"]);
eprintln!("Executing bindgen [output = {}]", output.display());
let status = cmd.status().context("Failed to execute bindgen")?;
if !status.success() {
Expand Down
2 changes: 1 addition & 1 deletion xtask/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ fn main() {

fn try_main() -> Result<()> {
let root = project_root();
let _d = xshell::pushd(&root)?;
let _d = xshell::pushd(root)?;
let flags = flags::Xtask::from_env()?;
if flags.verbose {
VERBOSE.store(true, std::sync::atomic::Ordering::Relaxed);
Expand Down