Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Matthias Wahl <[email protected]>
Signed-off-by: Heinz N. Gies <[email protected]>
  • Loading branch information
Licenser and mfelsche authored Oct 16, 2023
1 parent 8a6f714 commit aedc854
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions tremor-codec/src/codec/avro.rs
Original file line number Diff line number Diff line change
Expand Up @@ -130,12 +130,12 @@ impl<'a> SchemaWrapper<'a> {
}
}
#[async_trait::async_trait]
pub(crate) trait SchemaResover {
pub(crate) trait SchemaResolver {
async fn by_name(&self, name: &Name) -> Option<SchemaWrapper>;
}

#[async_trait::async_trait]
impl SchemaResover for AvroRegistry {
impl SchemaResolver for AvroRegistry {
async fn by_name(&self, name: &Name) -> Option<SchemaWrapper> {
self.by_name.get(name).map(SchemaWrapper::Ref)
}
Expand All @@ -149,7 +149,7 @@ pub(crate) async fn value_to_avro<'v, R>(
resolver: &R,
) -> Result<AvroValue>
where
R: SchemaResover + Sync,
R: SchemaResolver + Sync,
{
Ok(match schema {
Schema::Null => {
Expand Down
4 changes: 2 additions & 2 deletions tremor-codec/src/codec/kafka_schema_registry.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

//! The `avro` codec supports Apache Avro binary encoding.
//! The `kafka-schema-registry` codec supports Apache Avro binary encoding.
//!
//! The codec is configured with a codec following the avro json codec specification
//!
Expand Down Expand Up @@ -89,7 +89,7 @@ struct RecordResolver<'a> {
}

#[async_trait::async_trait]
impl SchemaResover for RecordResolver<'_> {
impl SchemaResolver for RecordResolver<'_> {

Check failure on line 92 in tremor-codec/src/codec/kafka_schema_registry.rs

View workflow job for this annotation

GitHub Actions / clippy

cannot find trait `SchemaResolver` in this scope

error[E0405]: cannot find trait `SchemaResolver` in this scope --> tremor-codec/src/codec/kafka_schema_registry.rs:92:6 | 92 | impl SchemaResolver for RecordResolver<'_> { | ^^^^^^^^^^^^^^ not found in this scope | help: consider importing this trait | 27 + use crate::avro::SchemaResolver; |
async fn by_name(&self, name: &Name) -> Option<SchemaWrapper> {
self.encoder
.get_schema_and_id(
Expand Down
2 changes: 1 addition & 1 deletion tremor-codec/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ mod prelude {
pub use tremor_value::{literal, Object, Value};
}

/// A Codec
/// Configuration, commonly used for codecs
pub type Config = tremor_config::NameWithConfig;

#[async_trait::async_trait]
Expand Down
2 changes: 1 addition & 1 deletion tremor-interceptor/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "tremor-interceptor"
edition = "2021"
authors = ["The Tremor Team"]
description = "Tremor Runtime"
description = "Tremor Preprocessors, Postprocessors, and maybe soon: Interceptors"
documentation = "https://docs.tremor.rs"
homepage = "https://www.tremor.rs"
license = "Apache-2.0"
Expand Down

0 comments on commit aedc854

Please sign in to comment.