Skip to content

Commit 7634834

Browse files
waywardmonkeysmadsmtm
authored andcommitted
Doc tweaks / improvements
This fixes a couple of typos and links some identifiers.
1 parent 29852c9 commit 7634834

File tree

5 files changed

+9
-9
lines changed

5 files changed

+9
-9
lines changed

convert.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ def convert_key(text, file):
168168
}
169169
}
170170
171-
/// Parse from string error, returned when string does not match to any Key variant.
171+
/// Parse from string error, returned when string does not match to any [`NamedKey`] variant.
172172
#[derive(Clone, Debug)]
173173
pub struct UnrecognizedNamedKeyError;
174174
@@ -198,7 +198,7 @@ def convert_code(text, file):
198198
/// Code is the physical position of a key.
199199
///
200200
/// The names are based on the US keyboard. If the key
201-
/// is not present on US keyboards a name from another
201+
/// is not present on US keyboards, a name from another
202202
/// layout is used.
203203
///
204204
/// Specification:
@@ -298,7 +298,7 @@ def convert_code(text, file):
298298
}
299299
}
300300
301-
/// Parse from string error, returned when string does not match to any Code variant.
301+
/// Parse from string error, returned when string does not match to any [`Code`] variant.
302302
#[derive(Clone, Debug)]
303303
pub struct UnrecognizedCodeError;
304304

src/code.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ use std::error::Error;
1414
/// Code is the physical position of a key.
1515
///
1616
/// The names are based on the US keyboard. If the key
17-
/// is not present on US keyboards a name from another
17+
/// is not present on US keyboards, a name from another
1818
/// layout is used.
1919
///
2020
/// Specification:
@@ -941,7 +941,7 @@ impl FromStr for Code {
941941
}
942942
}
943943

944-
/// Parse from string error, returned when string does not match to any Code variant.
944+
/// Parse from string error, returned when string does not match to any [`Code`] variant.
945945
#[derive(Clone, Debug)]
946946
pub struct UnrecognizedCodeError;
947947

src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ impl CompositionState {
149149
/// dead key combinations and IMEs.
150150
///
151151
/// A composition session is always started by a [`CompositionState::Start`]
152-
/// event followed my zero or more [`CompositionState::Update`] events
152+
/// event followed by zero or more [`CompositionState::Update`] events
153153
/// and terminated by a single [`CompositionState::End`] event.
154154
#[derive(Clone, Debug, Eq, Hash, PartialEq, PartialOrd, Ord)]
155155
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
@@ -171,7 +171,7 @@ pub enum Key {
171171
Named(NamedKey),
172172
}
173173

174-
/// Parse from string error, returned when string does not match to any Key variant.
174+
/// Parse from string error, returned when string does not match to any [`Key`] variant.
175175
#[derive(Clone, Debug)]
176176
pub struct UnrecognizedKeyError;
177177

src/named_key.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1307,7 +1307,7 @@ impl FromStr for NamedKey {
13071307
}
13081308
}
13091309

1310-
/// Parse from string error, returned when string does not match to any Key variant.
1310+
/// Parse from string error, returned when string does not match to any [`NamedKey`] variant.
13111311
#[derive(Clone, Debug)]
13121312
pub struct UnrecognizedNamedKeyError;
13131313

src/shortcuts.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ impl<T> ShortcutMatcher<T> {
4545

4646
/// Test a keyboard shortcut.
4747
///
48-
/// If the modifiers are active and the key is pressed
48+
/// If the modifiers are active and the key is pressed,
4949
/// execute the provided function.
5050
///
5151
/// ```rust

0 commit comments

Comments
 (0)