Fix misspelled words
This commit is contained in:
parent
96208e9fef
commit
7f13edd14a
10 changed files with 26 additions and 25 deletions
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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)?;
|
||||
|
|
|
|||
|
|
@ -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)?;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue