all: update dependencies
This commit is contained in:
parent
913b9d7213
commit
9863957779
5 changed files with 389 additions and 156 deletions
14
src/cli.rs
14
src/cli.rs
|
|
@ -11,7 +11,7 @@ mod unlock;
|
|||
use {
|
||||
crate::{compositor::start_compositor, portal},
|
||||
::log::Level,
|
||||
clap::{ArgEnum, Args, Parser, Subcommand},
|
||||
clap::{Args, Parser, Subcommand, ValueEnum},
|
||||
clap_complete::Shell,
|
||||
};
|
||||
|
||||
|
|
@ -27,7 +27,7 @@ struct Jay {
|
|||
#[derive(Args, Debug)]
|
||||
pub struct GlobalArgs {
|
||||
/// The log level.
|
||||
#[clap(arg_enum, long, default_value_t)]
|
||||
#[clap(value_enum, long, default_value_t)]
|
||||
pub log_level: CliLogLevel,
|
||||
}
|
||||
|
||||
|
|
@ -130,7 +130,7 @@ pub struct RunArgs {
|
|||
///
|
||||
/// Using this option, you can change which backends will be tried and change the order in
|
||||
/// which they will be tried. Multiple backends can be supplied as a comma-separated list.
|
||||
#[clap(arg_enum, use_value_delimiter = true, long)]
|
||||
#[clap(value_enum, use_value_delimiter = true, long)]
|
||||
pub backends: Vec<CliBackend>,
|
||||
}
|
||||
|
||||
|
|
@ -150,7 +150,7 @@ pub struct LogArgs {
|
|||
#[derive(Args, Debug)]
|
||||
pub struct SetLogArgs {
|
||||
/// The new log level.
|
||||
#[clap(arg_enum)]
|
||||
#[clap(value_enum)]
|
||||
level: CliLogLevel,
|
||||
}
|
||||
|
||||
|
|
@ -163,13 +163,13 @@ pub struct SeatTestArgs {
|
|||
seat: Option<String>,
|
||||
}
|
||||
|
||||
#[derive(ArgEnum, Debug, Copy, Clone, Hash, Eq, PartialEq)]
|
||||
#[derive(ValueEnum, Debug, Copy, Clone, Hash, Eq, PartialEq)]
|
||||
pub enum CliBackend {
|
||||
X11,
|
||||
Metal,
|
||||
}
|
||||
|
||||
#[derive(ArgEnum, Debug, Copy, Clone, Hash)]
|
||||
#[derive(ValueEnum, Debug, Copy, Clone, Hash)]
|
||||
pub enum CliLogLevel {
|
||||
Trace,
|
||||
Debug,
|
||||
|
|
@ -199,7 +199,7 @@ impl Default for CliLogLevel {
|
|||
#[derive(Args, Debug)]
|
||||
pub struct GenerateArgs {
|
||||
/// The shell to generate completions for
|
||||
#[clap(arg_enum)]
|
||||
#[clap(value_enum)]
|
||||
shell: Shell,
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1023,11 +1023,11 @@ impl ConfigProxyHandler {
|
|||
}
|
||||
|
||||
fn handle_request_(self: &Rc<Self>, msg: &[u8]) -> Result<(), CphError> {
|
||||
let (request, _) = match bincode::decode_from_slice::<ClientMessage, _>(msg, bincode_ops())
|
||||
{
|
||||
Ok(msg) => msg,
|
||||
Err(e) => return Err(CphError::ParsingFailed(e)),
|
||||
};
|
||||
let (request, _) =
|
||||
match bincode::borrow_decode_from_slice::<ClientMessage, _>(msg, bincode_ops()) {
|
||||
Ok(msg) => msg,
|
||||
Err(e) => return Err(CphError::ParsingFailed(e)),
|
||||
};
|
||||
match request {
|
||||
ClientMessage::Log {
|
||||
level,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue