Revert "Support building with 1.57.0 compiler"

This reverts the changes from 66e3293f4d
to support the 1.57.0 compiler (leaving the rustdoc fixes).

Making the changes to support 1.57 felt disappointing to require for the
sake of Winit being able to better support Linux distro packaging. Even
with the changes we still wouldn't really support
1.57 without also upstreaming changes to `cargo ndk`.

The new plan is to bank on Winit bumping its own MSRV to at least
1.58 which seems more than reasonable considering that even 1.59
is already >6months old.

Ref: https://github.com/rust-windowing/winit/pull/2453

This updates ci.yml to now build with 1.60, assuming that the above
PR will be accepted.
This commit is contained in:
Robert Bragg
2022-09-01 12:21:25 +01:00
parent 3a2fa5d1fa
commit b29162d149
3 changed files with 17 additions and 21 deletions
+4 -2
View File
@@ -16,8 +16,10 @@ jobs:
strategy:
fail-fast: false
matrix:
# We need to support the same compiler versions as Winit
rust_version: [1.57.0, stable]
# We need to support the same MSRV as Winit which we are currently
# assuming will be bumped to 1.60.0 soon:
# https://github.com/rust-windowing/winit/pull/2453
rust_version: [1.60.0, stable]
steps:
- uses: actions/checkout@v2
+6 -9
View File
@@ -175,10 +175,7 @@ impl AndroidAppInner {
} else {
-1
};
trace!(
"Calling ALooper_pollAll, timeout = {}",
timeout_milliseconds
);
trace!("Calling ALooper_pollAll, timeout = {timeout_milliseconds}");
let id = ALooper_pollAll(
timeout_milliseconds,
&mut fd,
@@ -265,9 +262,9 @@ impl AndroidAppInner {
_ => unreachable!(),
};
trace!("Read ID_MAIN command {} = {:?}", cmd_i, cmd);
trace!("Read ID_MAIN command {cmd_i} = {cmd:?}");
trace!("Calling android_app_pre_exec_cmd({})", cmd_i);
trace!("Calling android_app_pre_exec_cmd({cmd_i})");
ffi::android_app_pre_exec_cmd(native_app.as_ptr(), cmd_i);
match cmd {
MainEvent::ConfigChanged { .. } => {
@@ -294,19 +291,19 @@ impl AndroidAppInner {
trace!("Invoking callback for ID_MAIN command = {:?}", cmd);
callback(PollEvent::Main(cmd));
trace!("Calling android_app_post_exec_cmd({})", cmd_i);
trace!("Calling android_app_post_exec_cmd({cmd_i})");
ffi::android_app_post_exec_cmd(native_app.as_ptr(), cmd_i);
} else {
panic!("ALooper_pollAll returned ID_MAIN event with NULL android_poll_source!");
}
}
_ => {
error!("Ignoring spurious ALooper event source: id = {}, fd = {}, events = {:?}, data = {:?}", id, fd, events, source);
error!("Ignoring spurious ALooper event source: id = {id}, fd = {fd}, events = {events:?}, data = {source:?}");
}
}
}
_ => {
error!("Spurious ALooper_pollAll return value {} (ignored)", id);
error!("Spurious ALooper_pollAll return value {id} (ignored)");
}
}
}
+7 -10
View File
@@ -184,17 +184,14 @@ impl AndroidAppInner {
} else {
-1
};
trace!(
"Calling ALooper_pollAll, timeout = {}",
timeout_milliseconds
);
info!("Calling ALooper_pollAll, timeout = {timeout_milliseconds}");
let id = ALooper_pollAll(
timeout_milliseconds,
&mut fd,
&mut events,
&mut source as *mut *mut core::ffi::c_void,
);
trace!("pollAll id = {}", id);
info!("pollAll id = {id}");
match id {
ffi::ALOOPER_POLL_WAKE => {
trace!("ALooper_pollAll returned POLL_WAKE");
@@ -260,11 +257,11 @@ impl AndroidAppInner {
_ => unreachable!(),
};
trace!("Calling android_app_pre_exec_cmd({})", cmd_i);
trace!("Calling android_app_pre_exec_cmd({cmd_i})");
ffi::android_app_pre_exec_cmd(native_app.as_ptr(), cmd_i);
if let Some(cmd) = cmd {
trace!("Read ID_MAIN command {} = {:?}", cmd_i, cmd);
trace!("Read ID_MAIN command {cmd_i} = {cmd:?}");
match cmd {
MainEvent::ConfigChanged { .. } => {
self.config.replace(Configuration::clone_from_ptr(
@@ -293,7 +290,7 @@ impl AndroidAppInner {
callback(PollEvent::Main(cmd));
}
trace!("Calling android_app_post_exec_cmd({})", cmd_i);
trace!("Calling android_app_post_exec_cmd({cmd_i})");
ffi::android_app_post_exec_cmd(native_app.as_ptr(), cmd_i);
} else {
panic!("ALooper_pollAll returned ID_MAIN event with NULL android_poll_source!");
@@ -310,12 +307,12 @@ impl AndroidAppInner {
callback(PollEvent::Main(MainEvent::InputAvailable))
}
_ => {
error!("Ignoring spurious ALooper event source: id = {}, fd = {}, events = {:?}, data = {:?}", id, fd, events, source);
error!("Ignoring spurious ALooper event source: id = {id}, fd = {fd}, events = {events:?}, data = {source:?}");
}
}
}
_ => {
error!("Spurious ALooper_pollAll return value {} (ignored)", id);
error!("Spurious ALooper_pollAll return value {id} (ignored)");
}
}
}