Fix various typos in rustdocs.

This commit is contained in:
Sergio Benitez 2024-03-06 20:30:17 -08:00
parent d7bcef6cf3
commit 3927c931b2
3 changed files with 3 additions and 3 deletions

View File

@ -40,7 +40,7 @@ impl Bindable for UdsConfig {
let lock_path = self.path.with_extension(lock_ext); let lock_path = self.path.with_extension(lock_ext);
let lock_file = NamedFile::open_with(lock_path, &opts).await?; let lock_file = NamedFile::open_with(lock_path, &opts).await?;
unix::lock_exlusive_nonblocking(lock_file.file())?; unix::lock_exclusive_nonblocking(lock_file.file())?;
if self.path.exists() { if self.path.exists() {
tokio::fs::remove_file(&self.path).await?; tokio::fs::remove_file(&self.path).await?;
} }

View File

@ -81,7 +81,7 @@ type SizedBody<'r> = Pin<Box<dyn AsyncReadSeek + Send + 'r>>;
type UnsizedBody<'r> = Pin<Box<dyn AsyncRead + Send + 'r>>; type UnsizedBody<'r> = Pin<Box<dyn AsyncRead + Send + 'r>>;
enum Inner<'r> { enum Inner<'r> {
/// A body that can be seeked to determine it's size. /// A body that can be `seek()`ed to determine its size.
Seekable(SizedBody<'r>), Seekable(SizedBody<'r>),
/// A body that has no known size. /// A body that has no known size.
Unsized(UnsizedBody<'r>), Unsized(UnsizedBody<'r>),

View File

@ -1,7 +1,7 @@
use std::io; use std::io;
use std::os::fd::AsRawFd; use std::os::fd::AsRawFd;
pub fn lock_exlusive_nonblocking<T: AsRawFd>(file: &T) -> io::Result<()> { pub fn lock_exclusive_nonblocking<T: AsRawFd>(file: &T) -> io::Result<()> {
let raw_fd = file.as_raw_fd(); let raw_fd = file.as_raw_fd();
let res = unsafe { let res = unsafe {
libc::flock(raw_fd, libc::LOCK_EX | libc::LOCK_NB) libc::flock(raw_fd, libc::LOCK_EX | libc::LOCK_NB)