Skip to content

Commit c1d8a4a

Browse files
ramfox“ramfox”
authored andcommitted
remove all unnecessary allow attributes
1 parent 6034d8c commit c1d8a4a

File tree

4 files changed

+0
-15
lines changed

4 files changed

+0
-15
lines changed

multi-thread-client

34.9 KB
Binary file not shown.

multi-thread-server

35.6 KB
Binary file not shown.

single-thread-server

35.1 KB
Binary file not shown.

src/endpoint.rs

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -400,14 +400,12 @@ pub struct Connection {
400400
}
401401

402402
/// Result must be freed using `connection_free`.
403-
#[allow(non_snake_case)]
404403
#[ffi_export]
405404
pub fn connection_default() -> repr_c::Box<Connection> {
406405
Box::<Connection>::default().into()
407406
}
408407

409408
/// Frees the connection.
410-
#[allow(non_snake_case)]
411409
#[ffi_export]
412410
pub fn connection_free(conn: repr_c::Box<Connection>) {
413411
TOKIO_EXECUTOR.block_on(async move {
@@ -416,7 +414,6 @@ pub fn connection_free(conn: repr_c::Box<Connection>) {
416414
}
417415

418416
/// Estimated roundtrip time for the current connection in milli seconds.
419-
#[allow(non_snake_case)]
420417
#[ffi_export]
421418
pub fn connection_rtt(conn: &repr_c::Box<Connection>) -> u64 {
422419
TOKIO_EXECUTOR.block_on(async move {
@@ -448,7 +445,6 @@ pub fn connection_packet_loss(conn: &repr_c::Box<Connection>) -> f64 {
448445
/// Send a single datgram (unreliably).
449446
///
450447
/// Data must not be larger than the available `max_datagram` size.
451-
#[allow(non_snake_case)]
452448
#[ffi_export]
453449
pub fn connection_write_datagram(
454450
connection: &repr_c::Box<Connection>,
@@ -480,7 +476,6 @@ pub fn connection_write_datagram(
480476
/// Data must not be larger than the available `max_datagram` size.
481477
///
482478
/// Blocks the current thread until a datagram is received.
483-
#[allow(non_snake_case)]
484479
#[ffi_export]
485480
pub fn connection_read_datagram(
486481
connection: &repr_c::Box<Connection>,
@@ -560,7 +555,6 @@ pub fn connection_read_datagram_timeout(
560555
}
561556

562557
/// Returns the maximum datagram size. `0` if it is not supported.
563-
#[allow(non_snake_case)]
564558
#[ffi_export]
565559
pub fn connection_max_datagram_size(connection: &repr_c::Box<Connection>) -> usize {
566560
TOKIO_EXECUTOR.block_on(async move {
@@ -581,7 +575,6 @@ pub fn connection_max_datagram_size(connection: &repr_c::Box<Connection>) -> usi
581575
///
582576
/// An [`EndpointResult::IncomingError`] occurring here is likely not caused by the application or remote. The QUIC connection listens on a normal UDP socket and any reachable network endpoint can send datagrams to it, solicited or not.
583577
/// It is not considered fatal and is common to simply log and ignore.
584-
#[allow(non_snake_case)]
585578
#[ffi_export]
586579
pub fn endpoint_accept(
587580
ep: &repr_c::Box<Endpoint>,
@@ -641,7 +634,6 @@ async fn accept_conn(
641634
///
642635
/// An [`EndpointResult::IncomingError`] occurring here is likely not caused by the application or remote. The QUIC connection listens on a normal UDP socket and any reachable network endpoint can send datagrams to it, solicited or not.
643636
/// It is not considered fatal and is common to simply log and ignore.
644-
#[allow(non_snake_case)]
645637
#[ffi_export]
646638
pub fn endpoint_accept_any(
647639
ep: &repr_c::Box<Endpoint>,
@@ -677,7 +669,6 @@ pub fn endpoint_accept_any(
677669
///
678670
/// An [`EndpointResult::IncomingError`] occurring here is likely not caused by the application or remote. The QUIC connection listens on a normal UDP socket and any reachable network endpoint can send datagrams to it, solicited or not.
679671
/// It is not considered fatal and is common to simply log and ignore.
680-
#[allow(non_snake_case)]
681672
#[ffi_export]
682673
pub fn endpoint_accept_any_cb(
683674
ep: repr_c::Box<Endpoint>,
@@ -731,7 +722,6 @@ pub fn endpoint_accept_any_cb(
731722
///
732723
/// `ctx` is passed along to the callback, to allow passing context, it must be thread safe as the callback is
733724
/// called from another thread.
734-
#[allow(non_snake_case)]
735725
#[ffi_export]
736726
pub fn endpoint_direct_conn_cb(
737727
ep: repr_c::Box<Endpoint>,
@@ -837,7 +827,6 @@ impl From<iroh::endpoint::ConnectionType> for ConnectionType {
837827
///
838828
/// `ctx` is passed along to the callback, to allow passing context, it must be thread safe as the callback is
839829
/// called from another thread.
840-
#[allow(non_snake_case)]
841830
#[ffi_export]
842831
pub fn endpoint_conn_type_cb(
843832
ep: repr_c::Box<Endpoint>,
@@ -906,7 +895,6 @@ pub fn endpoint_conn_type_cb(
906895
/// Establish a uni directional connection.
907896
///
908897
/// Blocks the current thread until the connection is established.
909-
#[allow(non_snake_case)]
910898
#[ffi_export]
911899
pub fn connection_open_uni(
912900
conn: &repr_c::Box<Connection>,
@@ -940,7 +928,6 @@ pub fn connection_open_uni(
940928
/// Establish a bi directional connection.
941929
///
942930
/// Blocks the current thread until the connection is established.
943-
#[allow(non_snake_case)]
944931
#[ffi_export]
945932
pub fn connection_open_bi(
946933
conn: &repr_c::Box<Connection>,
@@ -1018,7 +1005,6 @@ pub fn connection_closed(conn: repr_c::Box<Connection>) -> EndpointResult {
10181005
/// Connects to the given node.
10191006
///
10201007
/// Blocks until the connection is established.
1021-
#[allow(non_snake_case)]
10221008
#[ffi_export]
10231009
pub fn endpoint_connect(
10241010
ep: &repr_c::Box<Endpoint>,
@@ -1055,7 +1041,6 @@ pub fn endpoint_connect(
10551041
/// to close gracefully, before shutting down the endpoint.
10561042
///
10571043
/// Consumes the endpoint, no need to free it afterwards.
1058-
#[allow(non_snake_case)]
10591044
#[ffi_export]
10601045
pub fn endpoint_close(ep: repr_c::Box<Endpoint>) {
10611046
TOKIO_EXECUTOR.block_on(async move {

0 commit comments

Comments
 (0)