diff --git a/convert.py b/convert.py index 1151b72..9b911a0 100644 --- a/convert.py +++ b/convert.py @@ -168,7 +168,7 @@ def convert_key(text, file): } } -/// Parse from string error, returned when string does not match to any Key variant. +/// Parse from string error, returned when string does not match to any [`NamedKey`] variant. #[derive(Clone, Debug)] pub struct UnrecognizedNamedKeyError; @@ -198,7 +198,7 @@ def convert_code(text, file): /// Code is the physical position of a key. /// /// The names are based on the US keyboard. If the key -/// is not present on US keyboards a name from another +/// is not present on US keyboards, a name from another /// layout is used. /// /// Specification: @@ -298,7 +298,7 @@ def convert_code(text, file): } } -/// Parse from string error, returned when string does not match to any Code variant. +/// Parse from string error, returned when string does not match to any [`Code`] variant. #[derive(Clone, Debug)] pub struct UnrecognizedCodeError; diff --git a/src/code.rs b/src/code.rs index 0f588c2..f562708 100644 --- a/src/code.rs +++ b/src/code.rs @@ -14,7 +14,7 @@ use std::error::Error; /// Code is the physical position of a key. /// /// The names are based on the US keyboard. If the key -/// is not present on US keyboards a name from another +/// is not present on US keyboards, a name from another /// layout is used. /// /// Specification: @@ -941,7 +941,7 @@ impl FromStr for Code { } } -/// Parse from string error, returned when string does not match to any Code variant. +/// Parse from string error, returned when string does not match to any [`Code`] variant. #[derive(Clone, Debug)] pub struct UnrecognizedCodeError; diff --git a/src/lib.rs b/src/lib.rs index 4984dbb..d3e5261 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -149,7 +149,7 @@ impl CompositionState { /// dead key combinations and IMEs. /// /// A composition session is always started by a [`CompositionState::Start`] -/// event followed my zero or more [`CompositionState::Update`] events +/// event followed by zero or more [`CompositionState::Update`] events /// and terminated by a single [`CompositionState::End`] event. #[derive(Clone, Debug, Eq, Hash, PartialEq, PartialOrd, Ord)] #[cfg_attr(feature = "serde", derive(Serialize, Deserialize))] @@ -171,7 +171,7 @@ pub enum Key { Named(NamedKey), } -/// Parse from string error, returned when string does not match to any Key variant. +/// Parse from string error, returned when string does not match to any [`Key`] variant. #[derive(Clone, Debug)] pub struct UnrecognizedKeyError; diff --git a/src/named_key.rs b/src/named_key.rs index 3812da9..9a30f50 100644 --- a/src/named_key.rs +++ b/src/named_key.rs @@ -1307,7 +1307,7 @@ impl FromStr for NamedKey { } } -/// Parse from string error, returned when string does not match to any Key variant. +/// Parse from string error, returned when string does not match to any [`NamedKey`] variant. #[derive(Clone, Debug)] pub struct UnrecognizedNamedKeyError; diff --git a/src/shortcuts.rs b/src/shortcuts.rs index 7831214..43b2ca8 100644 --- a/src/shortcuts.rs +++ b/src/shortcuts.rs @@ -45,7 +45,7 @@ impl ShortcutMatcher { /// Test a keyboard shortcut. /// - /// If the modifiers are active and the key is pressed + /// If the modifiers are active and the key is pressed, /// execute the provided function. /// /// ```rust