Skip to content

Commit

Permalink
chore(deps): bump mio from 0.8.10 to 0.8.11 (#758)
Browse files Browse the repository at this point in the history
* chore(deps): bump mio from 0.8.10 to 0.8.11

Bumps [mio](https://github.com/tokio-rs/mio) from 0.8.10 to 0.8.11.
- [Release notes](https://github.com/tokio-rs/mio/releases)
- [Changelog](https://github.com/tokio-rs/mio/blob/master/CHANGELOG.md)
- [Commits](tokio-rs/mio@v0.8.10...v0.8.11)

---
updated-dependencies:
- dependency-name: mio
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

* chore(backend): apply clippy suggestion

https://rust-lang.github.io/rust-clippy/master/index.html#/get_first
https://rust-lang.github.io/rust-clippy/master/index.html#/no_effect_underscore_binding

Signed-off-by: MichaIng <micha@dietpi.com>
  • Loading branch information
dependabot[bot] committed Jun 13, 2024
1 parent 6a47430 commit d7fa39d
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
4 changes: 2 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions src/page_handlers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ pub async fn process_handler(socket_send: &mut SocketSend, data_recv: &mut RecvC
tokio::select! {
biased;
data = data_recv.recv() => match data {
Some(Some(RequestTypes::Cmd { cmd, args: Some(args) })) => handle_error!(process_handler_helper(&cmd, args.get(0).map(String::as_str))),
Some(Some(RequestTypes::Cmd { cmd, args: Some(args) })) => handle_error!(process_handler_helper(&cmd, args.first().map(String::as_str))),
Some(Some(_)) => {}
_ => return false,
},
Expand Down Expand Up @@ -232,7 +232,7 @@ pub async fn service_handler(socket_send: &mut SocketSend, data_recv: &mut RecvC
args: Some(args),
} = data
{
if let Some(arg) = args.get(0) {
if let Some(arg) = args.first() {
handle_error!(Command::new("systemctl")
.args([&cmd, arg])
.spawn()
Expand Down Expand Up @@ -270,7 +270,7 @@ async fn browser_handler_helper(cmd: &str, args: &[String]) -> anyhow::Result<sh

tracing::debug!("Command is {}", cmd);

if let Some(arg) = args.get(0) {
if let Some(arg) = args.first() {
match cmd {
"cd" => {
return Ok(shared::BrowserList {
Expand Down
1 change: 1 addition & 0 deletions src/socket_handlers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ fn validate_token(token: &str, fingerprint: Option<&str>) -> TokenState {
}

#[instrument(skip_all)]
#[allow(clippy::no_effect_underscore_binding)]
pub async fn socket_handler(
socket: tokio_tungstenite::WebSocketStream<hyper::upgrade::Upgraded>,
fingerprint: Option<String>,
Expand Down

0 comments on commit d7fa39d

Please sign in to comment.