Skip to content

Commit

Permalink
Make bazel lints happy
Browse files Browse the repository at this point in the history
  • Loading branch information
caass committed Sep 25, 2024
1 parent 098f21f commit cfd749a
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions nativelink-service/src/operations_server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ impl OpsServer {
self.cache.lock().await.pop(&uuid).ok_or_else(|| {
Error::new(
Code::NotFound,
format!("Couldn't find page with token {}", uuid),
format!("Couldn't find page with token {uuid}"),
)
})?
} else {
Expand Down Expand Up @@ -209,11 +209,10 @@ impl Operations for OpsServer {
..
} = request.into_inner();

let normalized_page_size = if page_size < 0 || page_size > LIST_OPERATIONS_MAXIMUM_PAGE_SIZE
let normalized_page_size = if !(0..=LIST_OPERATIONS_MAXIMUM_PAGE_SIZE).contains(&page_size)
{
return Err(Status::out_of_range(format!(
"page size {} out of range 0..=100",
page_size
"page size {page_size} out of range 0..=100",
)));
} else if page_size == 0 {
LIST_OPERATIONS_DEFAULT_PAGE_SIZE
Expand Down

0 comments on commit cfd749a

Please sign in to comment.