style: remove explicit const declarations
This commit is contained in:
parent
3bd0dabc6e
commit
e3402b4187
1 changed files with 2 additions and 6 deletions
|
@ -46,9 +46,7 @@ async fn root() -> impl Responder {
|
|||
|
||||
#[web::get("/off")]
|
||||
async fn poweroff(cfg: State<Config>) -> Result<impl Responder> {
|
||||
const EXE: &str = "/sbin/poweroff";
|
||||
|
||||
util::run_as_root(&cfg.doas, EXE)
|
||||
util::run_as_root(&cfg.doas, "/sbin/poweroff")
|
||||
.kill_on_drop(false)
|
||||
.spawn()?;
|
||||
|
||||
|
@ -86,9 +84,7 @@ async fn ap_config(cfg: State<Config>) -> Result<impl Responder> {
|
|||
|
||||
#[web::get("/temp")]
|
||||
async fn temp(cfg: State<Config>) -> Result<impl Responder> {
|
||||
const EXE: &str = "/usr/bin/vcgencmd";
|
||||
|
||||
let out = util::run_as_root(&cfg.doas, EXE)
|
||||
let out = util::run_as_root(&cfg.doas, "/usr/bin/vcgencmd")
|
||||
.arg("measure_temp")
|
||||
.output()
|
||||
.await?;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue