Skip to content

Commit

Permalink
Suppress warnings
Browse files Browse the repository at this point in the history
Signed-off-by: Alexander V. Nikolaev <[email protected]>
  • Loading branch information
avnik committed Dec 13, 2024
1 parent b45e3a6 commit 6a7506c
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 5 deletions.
1 change: 0 additions & 1 deletion client/src/error.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
use anyhow::Error;
use tonic::Status;
use tonic_types::StatusExt;
use tracing::{debug, error};

fn rewrap_error(status: Status) -> Error {
let mut err = Error::msg(status.message().to_owned());
Expand Down
1 change: 0 additions & 1 deletion flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
};
crane = {
url = "github:ipetkov/crane";
inputs.nixpkgs.follows = "nixpkgs";
};
pre-commit-hooks-nix = {
url = "github:cachix/pre-commit-hooks.nix";
Expand Down
4 changes: 2 additions & 2 deletions src/admin/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -489,15 +489,15 @@ impl pb::admin_service_server::AdminService for AdminService {
escalate(request, |_| async {
self.inner
.send_system_command(String::from("suspend.target"))
.await;
.await?;
Ok(Empty {})
})
.await
}

async fn wakeup(
&self,
request: tonic::Request<Empty>,
_request: tonic::Request<Empty>,
) -> std::result::Result<tonic::Response<Empty>, tonic::Status> {
println!("Not supported");
Err(Status::unimplemented("Not supported"))
Expand Down
2 changes: 1 addition & 1 deletion src/utils/tonic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use anyhow;
use std::future::Future;
use tonic::{Code, Response, Status};
use tonic_types::{ErrorDetails, StatusExt};
use tracing::{debug, error};
use tracing::error;

pub async fn escalate<T, R, F, FA>(
req: tonic::Request<T>,
Expand Down

0 comments on commit 6a7506c

Please sign in to comment.