Skip to content

Commit

Permalink
- changes after review
Browse files Browse the repository at this point in the history
Signed-off-by: Ionut Slaveanu <ionut.slaveanu@adswizz.com>
  • Loading branch information
ionut-slaveanu committed Aug 12, 2024
1 parent 63b5aee commit 8e3d8e6
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ on:
env:
RUST_BACKTRACE: 1
# Some of the bindgen tests generate "deref-nullptr" warnings, see https://github.com/rust-lang/rust-bindgen/issues/1651
RUSTFLAGS: "--deny=warnings --allow deref-nullptr --allow renamed_and_removed_lints"
RUSTFLAGS: "--deny=warnings --allow deref-nullptr"
TEST_BIND: 1
GRPC_VERBOSITY: "info"

Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ categories = ["asynchronous", "network-programming"]
autoexamples = false

[package.metadata.docs.rs]
all-features = true
all-features = true

[dependencies]
grpcio-sys = { path = "grpc-sys", version = "0.13.0", default-features = false }
Expand Down
1 change: 1 addition & 0 deletions health/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
//! assert_eq!(statuss_resp.status, ServingStatus::Serving);
//! ```

#[allow(renamed_and_removed_lints)]
pub mod proto;
mod service;

Expand Down
3 changes: 1 addition & 2 deletions interop/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@ publish = false
default = ["protobuf-codec"]
protobuf-codec = ["protobuf", "grpcio/protobuf-codec", "grpcio-proto/protobuf-codec"]
protobufv3-codec = ["protobufv3", "grpcio/protobufv3-codec", "grpcio-proto/protobufv3-codec"]
_secure = []
openssl = ["_secure", "grpcio-sys/openssl"]
openssl = []

[dependencies]
grpcio = { path = "..", default-features = false, features = ["boringssl"]}
Expand Down
1 change: 1 addition & 0 deletions proto/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// Copyright 2019 TiKV Project Authors. Licensed under Apache-2.0.

#[allow(renamed_and_removed_lints)]
mod proto;

#[cfg(any(feature = "protobuf-codec", feature = "protobufv3-codec"))]
Expand Down
3 changes: 1 addition & 2 deletions src/metadata.rs
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,6 @@ impl Metadata {
/// Returns the metadata entry at the `index`.
///
/// `None` is returned if out of bound.
#[allow(clippy::unnecessary_cast)]
pub fn get(&self, index: usize) -> Option<(&str, &[u8])> {
if self.0.count <= index {
return None;
Expand All @@ -195,7 +194,7 @@ impl Metadata {
let key = grpc_sys::grpcwrap_metadata_array_get_key(&self.0, index, &mut key_len);
let val = grpc_sys::grpcwrap_metadata_array_get_value(&self.0, index, &mut val_len);
let key_str = str::from_utf8_unchecked(slice::from_raw_parts(key as _, key_len));
let val_bytes = slice::from_raw_parts(val as *const u8, val_len);
let val_bytes = slice::from_raw_parts(val.cast(), val_len);
Some((key_str, val_bytes))
}
}
Expand Down

0 comments on commit 8e3d8e6

Please sign in to comment.