diff --git a/.clippy.toml b/.clippy.toml new file mode 100644 index 000000000..f5449e53f --- /dev/null +++ b/.clippy.toml @@ -0,0 +1,25 @@ +# Project configuration for Clippy Rust code linter. +# See full lints list at: +# https://rust-lang.github.io/rust-clippy/master/index.html + +standard-macro-braces = [ + { name = "assert", brace = "(" }, + { name = "assert_eq", brace = "(" }, + { name = "assert_ne", brace = "(" }, + { name = "debug_assert", brace = "(" }, + { name = "debug_assert_eq", brace = "(" }, + { name = "debug_assert_ne", brace = "(" }, + { name = "error", brace = "(" }, + { name = "format", brace = "(" }, + { name = "format_args", brace = "(" }, + { name = "info", brace = "(" }, + { name = "matches", brace = "(" }, + { name = "panic", brace = "(" }, + { name = "print", brace = "(" }, + { name = "println", brace = "(" }, + { name = "trace", brace = "(" }, + { name = "vec", brace = "[" }, + { name = "warn", brace = "(" }, + { name = "write", brace = "(" }, + { name = "writeln", brace = "(" }, +] diff --git a/Cargo.toml b/Cargo.toml index 41c1c1e4b..30170ccb0 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -29,5 +29,4 @@ trackable02 = { version = "0.2.24", package = "trackable", default-features = fa trackable1 = { version = "1.3", package = "trackable", default-features = false } [dev-dependencies] -tokio-test = "0.4" hex = "0.4" diff --git a/README.md b/README.md index 75a51dce0..031b2f953 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,11 @@ `medea-turn` ============ -[![CI](https://github.com/instrumentisto/medea-turn-rs/workflows/CI/badge.svg?branch=main "CI")](https://github.com/instrumentisto/medea-turn-rs/actions?query=workflow%3ACI+branch%3Amain) +[![crates.io](https://img.shields.io/crates/v/medea-turn.svg "crates.io")](https://crates.io/crates/medea-turn) [![Rust 1.74+](https://img.shields.io/badge/rustc-1.74+-lightgray.svg "Rust 1.74+")](https://blog.rust-lang.org/2023/11/16/Rust-1.74.0.html) +[![Unsafe Forbidden](https://img.shields.io/badge/unsafe-forbidden-success.svg "Unsafe forbidden")](https://github.com/rust-secure-code/safety-dance) +[![CI](https://github.com/instrumentisto/medea-turn-rs/workflows/CI/badge.svg?branch=main "CI")](https://github.com/instrumentisto/medea-turn-rs/actions?query=workflow%3ACI+branch%3Amain) +[![Rust docs](https://docs.rs/medea-turn/badge.svg "Rust docs")](https://docs.rs/medea-turn) [Changelog](https://github.com/instrumentisto/medea-turn-rs/blob/master/CHANGELOG.md) diff --git a/src/lib.rs b/src/lib.rs index 2a4c18e94..709cb4ba2 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -5,10 +5,9 @@ rust_2018_idioms, rustdoc::all, trivial_casts, - trivial_numeric_casts, - unsafe_code + trivial_numeric_casts )] -#![forbid(non_ascii_idents)] +#![forbid(non_ascii_idents, unsafe_code)] #![warn( clippy::absolute_paths, clippy::as_conversions, @@ -52,7 +51,6 @@ clippy::let_underscore_untyped, clippy::lossy_float_literal, clippy::manual_c_str_literals, - clippy::manual_clamp, clippy::map_err_ignore, clippy::mem_forget, clippy::missing_assert_message, @@ -79,7 +77,6 @@ clippy::rc_buffer, clippy::rc_mutex, clippy::read_zero_byte_vec, - clippy::readonly_write_lock, clippy::redundant_clone, clippy::redundant_type_annotations, clippy::ref_patterns, @@ -128,9 +125,11 @@ missing_copy_implementations, missing_debug_implementations, missing_docs, + redundant_lifetimes, semicolon_in_expressions_from_macros, single_use_lifetimes, unit_bindings, + unnameable_types, unreachable_pub, unsafe_op_in_unsafe_fn, unstable_features, @@ -143,11 +142,10 @@ unused_results, variant_size_differences )] -#![cfg_attr(test, allow(unused_crate_dependencies, unused_lifetimes))] mod allocation; mod attr; -mod chandata; +pub mod chandata; pub mod relay; mod server; pub mod transport; @@ -161,6 +159,7 @@ pub(crate) use self::allocation::Allocation; pub(crate) use self::transport::Transport; pub use self::{ allocation::{FiveTuple, Info as AllocationInfo}, + chandata::ChannelData, server::{Config as ServerConfig, Server}, };