Fix misspelled words

This commit is contained in:
Arash Hatami
2021-11-14 18:52:05 +03:30
parent 96208e9fef
commit 7f13edd14a
10 changed files with 26 additions and 25 deletions

View File

@@ -75,8 +75,8 @@ message PunchHoleResponse {
enum Failure {
ID_NOT_EXIST = 1;
OFFLINE = 2;
LICENCE_MISMATCH = 3;
LICENCE_OVERUSE = 4;
LICENSE_MISMATCH = 3;
LICENSE_OVERUSE = 4;
}
Failure failure = 3;
string relay_server = 4;

View File

@@ -193,7 +193,7 @@ pub struct TransferJob {
file: Option<File>,
total_size: u64,
finished_size: u64,
transfered: u64,
transferred: u64,
}
#[inline]
@@ -268,8 +268,8 @@ impl TransferJob {
}
#[inline]
pub fn transfered(&self) -> u64 {
self.transfered
pub fn transferred(&self) -> u64 {
self.transferred
}
#[inline]
@@ -332,7 +332,7 @@ impl TransferJob {
self.file.as_mut().unwrap().write_all(&block.data).await?;
self.finished_size += block.data.len() as u64;
}
self.transfered += block.data.len() as u64;
self.transferred += block.data.len() as u64;
Ok(())
}
@@ -398,7 +398,7 @@ impl TransferJob {
compressed = true;
}
}
self.transfered += buf.len() as u64;
self.transferred += buf.len() as u64;
}
Ok(Some(FileTransferBlock {
id: self.id,

View File

@@ -34,7 +34,7 @@ fn new_socket(addr: std::net::SocketAddr, reuse: bool) -> Result<TcpSocket, std:
if reuse {
// windows has no reuse_port, but it's reuse_address
// almost equals to unix's reuse_port + reuse_address,
// though may introduce nondeterministic bahavior
// though may introduce nondeterministic behavior
#[cfg(unix)]
socket.set_reuseport(true)?;
socket.set_reuseaddr(true)?;

View File

@@ -29,7 +29,7 @@ fn new_socket(addr: SocketAddr, reuse: bool) -> Result<Socket, std::io::Error> {
if reuse {
// windows has no reuse_port, but it's reuse_address
// almost equals to unix's reuse_port + reuse_address,
// though may introduce nondeterministic bahavior
// though may introduce nondeterministic behavior
#[cfg(unix)]
socket.set_reuse_port(true)?;
socket.set_reuse_address(true)?;