Skip to content

Commit

Permalink
Merge pull request Smithay#40 from amtep/master
Browse files Browse the repository at this point in the history
Small fixes to doc strings
  • Loading branch information
Drakulix committed Mar 1, 2023
2 parents ac4b758 + 3761b9c commit 1fd9351
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions src/device.rs
Expand Up @@ -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<T: AsRef<OsStr>>(&self, property: T) -> Option<&OsStr> {
let prop = match util::os_str_to_cstring(property) {
Ok(s) => s,
Expand All @@ -278,7 +278,7 @@ impl Device {
}
}

/// Retreives the value of a device attribute.
/// Retrieves the value of a device attribute.
pub fn attribute_value<T: AsRef<OsStr>>(&self, attribute: T) -> Option<&OsStr> {
let attr = match util::os_str_to_cstring(attribute) {
Ok(s) => s,
Expand Down
10 changes: 5 additions & 5 deletions src/monitor.rs
Expand Up @@ -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,
Expand Down Expand Up @@ -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 {
Expand Down Expand Up @@ -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.
Expand Down

0 comments on commit 1fd9351

Please sign in to comment.