Skip to content

Commit 9228126

Browse files
authoredMar 13, 2024··
ci: add typos
As per the precedent set in winit, adds a spellchecker using the typos crate to CI. Links: rust-windowing/winit#3565 Signed-off-by: John Nunley <dev@notgull.net>
1 parent e1bf1e2 commit 9228126

File tree

10 files changed

+19
-12
lines changed

10 files changed

+19
-12
lines changed
 

‎.github/workflows/ci.yml

+5
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,13 @@ jobs:
2323
with:
2424
rust-version: nightly
2525
components: rustfmt
26+
- uses: taiki-e/install-action@v2
27+
with:
28+
tool: typos-cli
2629
- name: Check Formatting
2730
run: cargo +nightly fmt --all -- --check
31+
- name: Run Typos
32+
run: typos
2833

2934
tests:
3035
name: Tests

‎CHANGELOG.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@
6868

6969
# Version 0.30.3
7070

71-
- Fixed wrong amount of rects commited in `Surface::swap_buffers_with_damage` with EGL.
71+
- Fixed wrong amount of rects committed in `Surface::swap_buffers_with_damage` with EGL.
7272
- Added missing `Eq`, `PartialEq`, and `Hash` impls for `surface::Rect`.
7373

7474
# Version 0.30.2
@@ -92,9 +92,9 @@
9292
- **This version of `glutin` has been rewritten from the ground and no longer depends on `winit`, the `raw-window-handle` is now used instead of it.**
9393
- The Api is now built around `Display`, `Surface`, `Config`, and `Surface`. For more info see crate documentation and examples.
9494
- **Breaking:** Bump MSRV from `1.57` to `1.60`.
95-
- The ios support was removed for the lack of maintainance for now. In case there's a need for it, contributions are welcome.
95+
- The ios support was removed for the lack of maintenance for now. In case there's a need for it, contributions are welcome.
9696
- The context creation is no longer limited to winit's supported platforms.
97-
- The underlying Api providers are publically exposed now, so glutin could be used with just e.g. `EGL`.
97+
- The underlying Api providers are publicly exposed now, so glutin could be used with just e.g. `EGL`.
9898
- Fixed soundness issues with `Surface` MT safety, since before `EGLSurface` could be sent to a different thread, which is not safe.
9999
- Fallback to `Surface::swap_buffers` when `Surface::swap_buffers_with_damage` is not supported on `EGL`.
100100

‎_typos.toml

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[type.md.extend-identifiers]
2+
ApiPrefence = "ApiPrefence"

‎glutin/src/api/cgl/surface.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ impl Display {
8888
}
8989
}
9090

91-
/// A wrapper aroud `NSView`.
91+
/// A wrapper around `NSView`.
9292
pub struct Surface<T: SurfaceTypeTrait> {
9393
display: Display,
9494
config: Config,

‎glutin/src/api/glx/surface.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ impl<T: SurfaceTypeTrait> GlSurface<T> for Surface<T> {
238238
},
239239
_ => {
240240
return Err(
241-
ErrorKind::NotSupported("swap contol extrensions are not supported").into()
241+
ErrorKind::NotSupported("swap control extensions are not supported").into()
242242
);
243243
},
244244
};

‎glutin/src/api/wgl/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ unsafe fn load_extra_functions(
8787
// setups).
8888
unsafe { wm::RegisterClassExW(&class) };
8989

90-
// This dummy wnidow should match the real one enough to get the same OpenGL
90+
// This dummy window should match the real one enough to get the same OpenGL
9191
// driver.
9292
let title =
9393
OsStr::new("dummy window").encode_wide().chain(Some(0).into_iter()).collect::<Vec<_>>();

‎glutin/src/api/wgl/surface.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ impl<T: SurfaceTypeTrait> GlSurface<T> for Surface<T> {
144144
},
145145
_ => {
146146
return Err(
147-
ErrorKind::NotSupported("swap contol extrensions are not supported").into()
147+
ErrorKind::NotSupported("swap control extensions are not supported").into()
148148
)
149149
},
150150
};

‎glutin/src/context.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ pub trait NotCurrentGlContext: Sealed {
5151

5252
/// Make [`Self::Surface`] on the calling thread producing the
5353
/// [`Self::PossiblyCurrentContext`] indicating that the context could
54-
/// be current on the theard.
54+
/// be current on the thread.
5555
///
5656
/// # Platform specific
5757
///

‎glutin/src/error.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ pub struct Error {
1414
/// The raw message from the os in case it could be obtained.
1515
raw_os_message: Option<String>,
1616

17-
/// The simplified error kind to handle mathing.
17+
/// The simplified error kind to handle matching.
1818
kind: ErrorKind,
1919
}
2020

@@ -151,7 +151,7 @@ impl ErrorKind {
151151
InitializationFailed => "initialization failed",
152152
BadAccess => "access to the resource failed",
153153
OutOfMemory => "out of memory",
154-
BadAttribute => "an anrecougnized attribute or attribute value was passed",
154+
BadAttribute => "an unrecognized attribute or attribute value was passed",
155155
BadContext => "argument does not name a valid context",
156156
BadContextState => "the context is in a bad state",
157157
BadConfig => "argument does not name a valid config",
@@ -160,7 +160,7 @@ impl ErrorKind {
160160
BadSurface => "argument does not name a valid surface",
161161
BadPbuffer => "argument does not name a valid pbuffer",
162162
BadPixmap => "argument does not name a valid pixmap",
163-
BadMatch => "arguments are inconsistance",
163+
BadMatch => "arguments are inconsistent",
164164
BadParameter => "one or more argument values are invalid",
165165
BadNativePixmap => "argument does not refer to a valid native pixmap",
166166
BadNativeWindow => "argument does not refer to a valid native window",

‎glutin/src/platform/x11.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ static XRENDER: Lazy<Option<Xrender>> = Lazy::new(|| Xrender::open().ok());
1616

1717
/// The GlConfig extension trait to get X11 specific properties from a config.
1818
pub trait X11GlConfigExt {
19-
/// The `X11VisualInfo` that must be used to inititalize the Xlib window.
19+
/// The `X11VisualInfo` that must be used to initialize the Xlib window.
2020
fn x11_visual(&self) -> Option<X11VisualInfo>;
2121
}
2222

0 commit comments

Comments
 (0)
Please sign in to comment.