Skip to content

Commit

Permalink
fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
yorktown-class committed Oct 11, 2023
1 parent 1a99dc7 commit ca28e43
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ pub struct ClientServiceConfig {
#[serde(skip)]
pub name: String,
pub local_addr: String,
pub recommend_blind_addr: Option<String>,
pub recommend_bind_addr: Option<String>,
pub token: Option<MaskedString>,
pub nodelay: Option<bool>,
pub retry_interval: Option<u64>,
Expand Down
6 changes: 3 additions & 3 deletions src/protocol.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
pub const HASH_WIDTH_IN_BYTES: usize = 32;

use anyhow::{bail, Context, Result, anyhow};
use anyhow::{bail, Context, Result};
use bytes::{Bytes, BytesMut};
use lazy_static::lazy_static;
use serde::{Deserialize, Serialize};
Expand Down Expand Up @@ -227,9 +227,9 @@ pub async fn read_server_service_config_from_client<T: AsyncRead + AsyncWrite +
let config: ClientServiceConfig = toml::from_str(&String::from_utf8(buf)?[..]).with_context(|| "Failed to parse the config")?;
Ok(
ServerServiceConfig{
bind_addr: match config.recommend_blind_addr {
bind_addr: match config.recommend_bind_addr {
Some(bind_addr) => bind_addr,
None => return Err(anyhow!(format!("Expect 'recommend_blind_addr' in {}", config.name))),
None => return Err(anyhow::anyhow!(format!("Expect 'recommend_bind_addr' in {}", config.name))),
},
service_type: config.service_type,
name: config.name,
Expand Down

0 comments on commit ca28e43

Please sign in to comment.