Bump minimum supported Rust version to 1.34.0

This commit is contained in:
Christian Duerr 2019-07-30 22:13:51 +00:00 committed by GitHub
parent 72dfa477a9
commit 86b9cdbabe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 230 additions and 191 deletions

View File

@ -12,7 +12,7 @@ os:
- windows
rust:
- 1.32.0
- 1.34.0
- stable
- nightly

View File

@ -6,6 +6,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased]
### Packaging
- Minimum Rust version has been bumped to 1.34.0
### Added
- Block selection mode when Control is held while starting a selection

View File

@ -63,7 +63,7 @@ All patches have to be sent on Github as [pull requests](https://github.com/jwil
If you are looking for a place to start contributing to Alacritty, take a look at the [help wanted](https://github.com/jwilm/alacritty/issues?q=is%3Aopen+is%3Aissue+label%3A%22help+wanted%22) and [easy](https://github.com/jwilm/alacritty/issues?q=is%3Aopen+is%3Aissue+label%3A%22D+-+easy%22) issues.
Please note that the minimum supported version of Alacritty is Rust 1.32.0. All patches are expected to work with the minimum supported version.
Please note that the minimum supported version of Alacritty is Rust 1.34.0. All patches are expected to work with the minimum supported version.
### Testing

343
Cargo.lock generated

File diff suppressed because it is too large Load Diff

View File

@ -1074,6 +1074,7 @@ mod tests {
assert!(!subset_mods.triggers_match(&superset_mods));
}
#[test]
fn binding_trigger_input() {
let mut binding = MockBinding::default();
binding.trigger = 13;

View File

@ -194,35 +194,30 @@ pub fn new<T: ToWinsize>(config: &Config, size: &T, window_id: Option<usize>) ->
builder.env("WINDOWID", format!("{}", window_id));
}
// TODO: Rust 1.34.0
#[allow(deprecated)]
builder.before_exec(move || {
// Create a new process group
unsafe {
unsafe {
builder.pre_exec(move || {
// Create a new process group
let err = libc::setsid();
if err == -1 {
die!("Failed to set session id: {}", errno());
}
}
set_controlling_terminal(slave);
set_controlling_terminal(slave);
// No longer need slave/master fds
unsafe {
// No longer need slave/master fds
libc::close(slave);
libc::close(master);
}
unsafe {
libc::signal(libc::SIGCHLD, libc::SIG_DFL);
libc::signal(libc::SIGHUP, libc::SIG_DFL);
libc::signal(libc::SIGINT, libc::SIG_DFL);
libc::signal(libc::SIGQUIT, libc::SIG_DFL);
libc::signal(libc::SIGTERM, libc::SIG_DFL);
libc::signal(libc::SIGALRM, libc::SIG_DFL);
}
Ok(())
});
Ok(())
});
}
// Handle set working directory option
if let Some(ref dir) = config.working_directory() {

View File

@ -87,29 +87,29 @@ where
I: IntoIterator<Item = S>,
S: AsRef<OsStr>,
{
// TODO: Rust 1.34.0
#[allow(deprecated)]
Command::new(program)
.args(args)
.stdin(Stdio::null())
.stdout(Stdio::null())
.stderr(Stdio::null())
.before_exec(|| unsafe {
match ::libc::fork() {
-1 => return Err(io::Error::last_os_error()),
0 => (),
_ => ::libc::_exit(0),
}
unsafe {
Command::new(program)
.args(args)
.stdin(Stdio::null())
.stdout(Stdio::null())
.stderr(Stdio::null())
.pre_exec(|| {
match ::libc::fork() {
-1 => return Err(io::Error::last_os_error()),
0 => (),
_ => ::libc::_exit(0),
}
if ::libc::setsid() == -1 {
return Err(io::Error::last_os_error());
}
if ::libc::setsid() == -1 {
return Err(io::Error::last_os_error());
}
Ok(())
})
.spawn()?
.wait()
.map(|_| ())
Ok(())
})
.spawn()?
.wait()
.map(|_| ())
}
}
#[cfg(windows)]

View File

@ -7,7 +7,7 @@ URL: https://github.com/jwilm/alacritty
VCS: https://github.com/jwilm/alacritty.git
Source: alacritty-%{version}.tar
BuildRequires: rust >= 1.32.0
BuildRequires: rust >= 1.34.0
BuildRequires: cargo
BuildRequires: cmake
BuildRequires: freetype-devel

View File

@ -146,7 +146,7 @@ impl crate::Rasterize for DirectWriteRasterizer {
let rendering_mode = font.get_recommended_rendering_mode_default_params(
glyph.size.as_f32_pts(),
self.device_pixel_ratio * (96.0 / 72.0),
dwrote::DWRITE_MEASURING_MODE_NATURAL
dwrote::DWRITE_MEASURING_MODE_NATURAL,
);
let glyph_analysis = GlyphRunAnalysis::create(