Skip to content

Commit

Permalink
fix typos
Browse files Browse the repository at this point in the history
  • Loading branch information
giangndm committed Sep 28, 2024
1 parent 377268d commit 3636031
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion crates/protocol/src/stream.rs
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ where
Poll::Pending => {}

Check warning on line 179 in crates/protocol/src/stream.rs

View check run for this annotation

Codecov / codecov/patch

crates/protocol/src/stream.rs#L179

Added line #L179 was not covered by tests
}
} else if copy_buffer.is_lock_write() {

Check warning on line 181 in crates/protocol/src/stream.rs

View check run for this annotation

Codecov / codecov/patch

crates/protocol/src/stream.rs#L181

Added line #L181 was not covered by tests
// we finish then switch to ShutingDonw
// we finish then switch to ShuttingDown
log::info!(
"[OneDirectCopy {} => {}] write finished after {} bytes => switch to ShuttingDown state",
from.name(),
Expand Down
2 changes: 1 addition & 1 deletion crates/relayer/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ pub use proxy_listener::cluster::{
};
pub use quinn;

pub use proxy_listener::cluster::{run_sdn, ProxyClusterIncommingTunnel, ProxyClusterListener};
pub use proxy_listener::cluster::{run_sdn, ProxyClusterIncomingTunnel, ProxyClusterListener};
pub use proxy_listener::tcp::{ProxyTcpListener, ProxyTcpTunnel};
pub use proxy_listener::{ProxyListener, ProxyTunnel};

Expand Down
4 changes: 2 additions & 2 deletions crates/relayer/src/proxy_listener.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use futures::{AsyncRead, AsyncWrite};
use protocol::stream::NamedStream;
use tcp::ProxyTcpTunnel;

use crate::ProxyClusterIncommingTunnel;
use crate::ProxyClusterIncomingTunnel;

pub mod cluster;
pub mod tcp;
Expand Down Expand Up @@ -35,7 +35,7 @@ pub trait ProxyListener: Send + Sync {
#[derive(From)]
pub enum ProxyTunnelWrap {
Tcp(ProxyTcpTunnel),
Cluster(ProxyClusterIncommingTunnel),
Cluster(ProxyClusterIncomingTunnel),
}

impl ProxyTunnel for ProxyTunnelWrap {
Expand Down
14 changes: 7 additions & 7 deletions crates/relayer/src/proxy_listener/cluster.rs
Original file line number Diff line number Diff line change
Expand Up @@ -225,11 +225,11 @@ impl ProxyClusterListener {
}

impl ProxyListener for ProxyClusterListener {
type Stream = ProxyClusterIncommingTunnel;
type Stream = ProxyClusterIncomingTunnel;
async fn recv(&mut self) -> Option<Self::Stream> {

Check warning on line 229 in crates/relayer/src/proxy_listener/cluster.rs

View check run for this annotation

Codecov / codecov/patch

crates/relayer/src/proxy_listener/cluster.rs#L229

Added line #L229 was not covered by tests
let connecting = self.server.accept().await?;
log::info!("incoming connection from {}", connecting.remote_address());
Some(ProxyClusterIncommingTunnel {
Some(ProxyClusterIncomingTunnel {

Check warning on line 232 in crates/relayer/src/proxy_listener/cluster.rs

View check run for this annotation

Codecov / codecov/patch

crates/relayer/src/proxy_listener/cluster.rs#L232

Added line #L232 was not covered by tests
virtual_addr: connecting.remote_address(),
domain: "".to_string(),
handshake: vec![],
Expand All @@ -241,7 +241,7 @@ impl ProxyListener for ProxyClusterListener {
}
}

pub struct ProxyClusterIncommingTunnel {
pub struct ProxyClusterIncomingTunnel {
virtual_addr: SocketAddr,
domain: String,
handshake: Vec<u8>,
Expand All @@ -251,7 +251,7 @@ pub struct ProxyClusterIncommingTunnel {
wait_stream_write: Option<Waker>,
}

impl ProxyTunnel for ProxyClusterIncommingTunnel {
impl ProxyTunnel for ProxyClusterIncomingTunnel {
fn source_addr(&self) -> String {
format!("sdn-quic://{}", self.virtual_addr)
}
Expand Down Expand Up @@ -298,13 +298,13 @@ impl ProxyTunnel for ProxyClusterIncommingTunnel {
}
}

impl NamedStream for ProxyClusterIncommingTunnel {
impl NamedStream for ProxyClusterIncomingTunnel {
fn name(&self) -> &'static str {
"proxy-sdn-quic-tunnel"
}

Check warning on line 304 in crates/relayer/src/proxy_listener/cluster.rs

View check run for this annotation

Codecov / codecov/patch

crates/relayer/src/proxy_listener/cluster.rs#L302-L304

Added lines #L302 - L304 were not covered by tests
}

impl AsyncRead for ProxyClusterIncommingTunnel {
impl AsyncRead for ProxyClusterIncomingTunnel {
fn poll_read(
self: Pin<&mut Self>,
cx: &mut Context<'_>,
Expand All @@ -329,7 +329,7 @@ impl AsyncRead for ProxyClusterIncommingTunnel {
}

Check warning on line 329 in crates/relayer/src/proxy_listener/cluster.rs

View check run for this annotation

Codecov / codecov/patch

crates/relayer/src/proxy_listener/cluster.rs#L329

Added line #L329 was not covered by tests
}

impl AsyncWrite for ProxyClusterIncommingTunnel {
impl AsyncWrite for ProxyClusterIncomingTunnel {
fn poll_write(
self: Pin<&mut Self>,
cx: &mut Context<'_>,
Expand Down

0 comments on commit 3636031

Please sign in to comment.