mirror of
https://codeberg.org/Codeberg/pages-server.git
synced 2025-05-02 17:11:59 +00:00
upgrade to edition 2021, clippy fixes, error fixed
This commit is contained in:
parent
6def9f298c
commit
b540284764
5 changed files with 18 additions and 15 deletions
src
|
@ -3,12 +3,13 @@ mod controllers;
|
|||
|
||||
use std::process::exit;
|
||||
|
||||
use exitcode;
|
||||
|
||||
use controllers::{Controller, LinController, LogController, RawController};
|
||||
|
||||
use crate::cli::build_cli;
|
||||
|
||||
fn main() {
|
||||
let matches = cli::parse_args();
|
||||
let app = build_cli();
|
||||
let matches = app.get_matches();
|
||||
|
||||
let (default_ctrl, ctrls) = controllers::get_controllers();
|
||||
|
||||
|
@ -41,7 +42,7 @@ fn main() {
|
|||
} else if matches.is_present("ful") {
|
||||
controller.set_brightness(controller.get_max_brightness());
|
||||
} else {
|
||||
panic!("{}", ERROR_MSG);
|
||||
build_cli().print_long_help().unwrap();
|
||||
}
|
||||
|
||||
exit(exitcode::OK);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue