feat: upgraded to rust 1.89.0, fixed new compiler warnings
This commit is contained in:
@@ -20,21 +20,21 @@ pub trait DisplayBackend: Send + Sync + 'static {
|
|||||||
) -> Option<Window>;
|
) -> Option<Window>;
|
||||||
}
|
}
|
||||||
|
|
||||||
pub struct NoBackend;
|
// pub struct NoBackend;
|
||||||
|
|
||||||
impl DisplayBackend for NoBackend {
|
// impl DisplayBackend for NoBackend {
|
||||||
const IS_X11: bool = false;
|
// const IS_X11: bool = false;
|
||||||
const IS_WAYLAND: bool = false;
|
// const IS_WAYLAND: bool = false;
|
||||||
|
|
||||||
fn initialize_window(
|
// fn initialize_window(
|
||||||
_window_init: &WindowInitiator,
|
// _window_init: &WindowInitiator,
|
||||||
_monitor: gdk::Rectangle,
|
// _monitor: gdk::Rectangle,
|
||||||
x: i32,
|
// x: i32,
|
||||||
y: i32,
|
// y: i32,
|
||||||
) -> Option<Window> {
|
// ) -> Option<Window> {
|
||||||
Some(Window::new(gtk::WindowType::Toplevel, x, y))
|
// Some(Window::new(gtk::WindowType::Toplevel, x, y))
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
|
||||||
#[cfg(feature = "wayland")]
|
#[cfg(feature = "wayland")]
|
||||||
mod platform_wayland {
|
mod platform_wayland {
|
||||||
|
|||||||
@@ -10,17 +10,17 @@ pub struct FileDatabase {
|
|||||||
latest_id: usize,
|
latest_id: usize,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(thiserror::Error, Debug)]
|
// #[derive(thiserror::Error, Debug)]
|
||||||
pub enum FilesError {
|
// pub enum FilesError {
|
||||||
#[error(transparent)]
|
// #[error(transparent)]
|
||||||
IoError(#[from] std::io::Error),
|
// IoError(#[from] std::io::Error),
|
||||||
|
|
||||||
#[error(transparent)]
|
// #[error(transparent)]
|
||||||
DiagError(#[from] DiagError),
|
// DiagError(#[from] DiagError),
|
||||||
|
|
||||||
#[error(transparent)]
|
// #[error(transparent)]
|
||||||
ParserError(#[from] anyhow::Error),
|
// ParserError(#[from] anyhow::Error),
|
||||||
}
|
// }
|
||||||
|
|
||||||
impl FileDatabase {
|
impl FileDatabase {
|
||||||
pub fn new() -> Self {
|
pub fn new() -> Self {
|
||||||
|
|||||||
@@ -1,10 +0,0 @@
|
|||||||
use derive_more::{Debug, *};
|
|
||||||
|
|
||||||
#[derive(Debug, Copy, Clone, Eq, PartialEq, Display)]
|
|
||||||
#[display(".x*.y:.width*.height")]
|
|
||||||
pub struct Rect {
|
|
||||||
pub x: i32,
|
|
||||||
pub y: i32,
|
|
||||||
pub width: i32,
|
|
||||||
pub height: i32,
|
|
||||||
}
|
|
||||||
@@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
This file mostly contains wayland/x11 setup and args stuff
|
This file mostly contains wayland/x11 setup and args stuff
|
||||||
If you are interesting in something like window rendering,
|
If you are interesting in something like window rendering,
|
||||||
then you can read `app.rs`. It is like the heart of ewwii.
|
then you can read `app.rs`. It is where daemon commands are handled.
|
||||||
|
|
||||||
The full options (arguments) are parsed in `opts.rs` as well as `app.rs`.
|
The full options (arguments) are parsed in `opts.rs` as well as `app.rs`.
|
||||||
|
|
||||||
@@ -45,7 +45,6 @@ mod dynval;
|
|||||||
mod error_handling_ctx;
|
mod error_handling_ctx;
|
||||||
mod file_database;
|
mod file_database;
|
||||||
mod gen_diagnostic_macro;
|
mod gen_diagnostic_macro;
|
||||||
mod geometry;
|
|
||||||
mod ipc_server;
|
mod ipc_server;
|
||||||
mod opts;
|
mod opts;
|
||||||
mod paths;
|
mod paths;
|
||||||
|
|||||||
@@ -68,7 +68,7 @@ impl ParseConfig {
|
|||||||
.map_err(|e| anyhow!("Failed to read {:?}: {}", file_path.as_ref(), e))?)
|
.map_err(|e| anyhow!("Failed to read {:?}: {}", file_path.as_ref(), e))?)
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn initial_poll_listen_scope(code: &str) -> Result<Scope> {
|
pub fn initial_poll_listen_scope(code: &str) -> Result<Scope<'_>> {
|
||||||
// Setting the initial value of poll/listen
|
// Setting the initial value of poll/listen
|
||||||
let mut scope = Scope::new();
|
let mut scope = Scope::new();
|
||||||
for (var, initial) in extract_poll_and_listen_vars(code)? {
|
for (var, initial) in extract_poll_and_listen_vars(code)? {
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
[toolchain]
|
[toolchain]
|
||||||
channel = "1.81.0"
|
# channel = "1.81.0"
|
||||||
|
channel = "1.89.0"
|
||||||
components = [ "rust-src" ]
|
components = [ "rust-src" ]
|
||||||
profile = "default"
|
profile = "default"
|
||||||
|
|||||||
Reference in New Issue
Block a user