From 3761b9c67e76db37e63b9f44b8d6c3f4c44a2cca Mon Sep 17 00:00:00 2001 From: Richard Braakman Date: Tue, 28 Feb 2023 13:24:36 +0200 Subject: [PATCH] Small fixes to doc strings --- src/device.rs | 4 ++-- src/monitor.rs | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/device.rs b/src/device.rs index f6d5676..49e5a28 100644 --- a/src/device.rs +++ b/src/device.rs @@ -263,7 +263,7 @@ impl Device { unsafe { util::ptr_to_os_str(ffi::udev_device_get_driver(self.device)) } } - /// Retreives the value of a device property. + /// Retrieves the value of a device property. pub fn property_value>(&self, property: T) -> Option<&OsStr> { let prop = match util::os_str_to_cstring(property) { Ok(s) => s, @@ -278,7 +278,7 @@ impl Device { } } - /// Retreives the value of a device attribute. + /// Retrieves the value of a device attribute. pub fn attribute_value>(&self, attribute: T) -> Option<&OsStr> { let attr = match util::os_str_to_cstring(attribute) { Ok(s) => s, diff --git a/src/monitor.rs b/src/monitor.rs index 0b1d994..9be5d53 100644 --- a/src/monitor.rs +++ b/src/monitor.rs @@ -23,7 +23,7 @@ use {AsRaw, AsRawWithContext, Device, FromRaw}; /// /// A monitor communicates with the kernel over a socket. Filtering events is performed efficiently /// in the kernel, and only events that match the filters are received by the socket. Filters must -/// be setup before listening for events. +/// be set up before listening for events. pub struct Builder { udev: Udev, monitor: *mut ffi::udev_monitor, @@ -127,10 +127,10 @@ impl Builder { /// An active monitor that can receive events. /// -/// The events received by a `Socket` match the filters setup by the `Monitor` that created +/// The events received by a `Socket` match the filters set up by the `Monitor` that created /// the socket. /// -/// Monitors are initially setup to receive events from the kernel via a nonblocking socket. A +/// Monitors are initially set up to receive events from the kernel via a nonblocking socket. A /// variant of `poll()` should be used on the file descriptor returned by the `AsRawFd` trait to /// wait for new events. pub struct Socket { @@ -218,10 +218,10 @@ pub enum EventType { /// A device was removed. Remove, - /// A device was bound to driver. + /// A device was bound to a driver. Bind, - /// A device was unbound to driver. + /// A device was unbound from a driver. Unbind, /// An unknown event occurred.