mirror of
https://github.com/alacritty/alacritty
synced 2024-10-14 19:53:00 +00:00
Fix compiler warnings
This commit is contained in:
parent
55d346c7d4
commit
f59aa19892
|
@ -26,8 +26,8 @@ use copypasta::x11_clipboard::{Primary as X11SelectionClipboard, X11ClipboardCon
|
|||
use copypasta::{ClipboardContext, ClipboardProvider};
|
||||
|
||||
pub struct Clipboard {
|
||||
clipboard: Box<ClipboardProvider>,
|
||||
selection: Option<Box<ClipboardProvider>>,
|
||||
clipboard: Box<dyn ClipboardProvider>,
|
||||
selection: Option<Box<dyn ClipboardProvider>>,
|
||||
}
|
||||
|
||||
impl Clipboard {
|
||||
|
|
|
@ -194,6 +194,8 @@ 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 {
|
||||
|
|
|
@ -73,7 +73,7 @@ impl UrlParser {
|
|||
self.state.char_indices().rev().skip_while(|(byte_index, _)| *byte_index >= index);
|
||||
for (byte_index, c) in iter {
|
||||
match c {
|
||||
'a'...'z' | 'A'...'Z' => (),
|
||||
'a'..='z' | 'A'..='Z' => (),
|
||||
_ => {
|
||||
self.origin =
|
||||
self.origin.saturating_sub(byte_index + c.width().unwrap_or(1));
|
||||
|
|
|
@ -87,6 +87,8 @@ where
|
|||
I: IntoIterator<Item = S>,
|
||||
S: AsRef<OsStr>,
|
||||
{
|
||||
// TODO: Rust 1.34.0
|
||||
#[allow(deprecated)]
|
||||
Command::new(program)
|
||||
.args(args)
|
||||
.stdin(Stdio::null())
|
||||
|
|
|
@ -539,7 +539,7 @@ pub enum Error {
|
|||
}
|
||||
|
||||
impl ::std::error::Error for Error {
|
||||
fn cause(&self) -> Option<&::std::error::Error> {
|
||||
fn cause(&self) -> Option<&dyn (::std::error::Error)> {
|
||||
match *self {
|
||||
Error::FreeType(ref err) => Some(err),
|
||||
_ => None,
|
||||
|
|
Loading…
Reference in a new issue