style: remove explicit const declarations

This commit is contained in:
DarkCat09 2025-03-26 15:52:44 +04:00
parent 3bd0dabc6e
commit e3402b4187
Signed by: DarkCat09
SSH key fingerprint: SHA256:SnH1iYY/ogxxRmt1I6piy+aVUUzrOWvfksQWfhZ8JUM

View file

@ -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?;