diff --git a/changelog.md b/changelog.md index 2610725fd2..e902d7840c 100644 --- a/changelog.md +++ b/changelog.md @@ -1,6 +1,10 @@ In this file will be listed the changes, especially the breaking ones that one should be careful of when upgrading from a version of rust-sdl2 to another. +### Unreleased + +[PR #1408](https://github.com/Rust-SDL2/rust-sdl2/pull/1408) Allow comparing `Version`s, add constant with the version the bindings were compiled with. + ### v0.37.0 [PR #1406](https://github.com/Rust-SDL2/rust-sdl2/pull/1406) Update bindings to SDL 2.0.26, add Event.is\_touch() for mouse events, upgrade wgpu to 0.20 in examples diff --git a/src/sdl2/version.rs b/src/sdl2/version.rs index 8acbbec43c..427d7b1868 100644 --- a/src/sdl2/version.rs +++ b/src/sdl2/version.rs @@ -1,13 +1,11 @@ -/*! -Querying SDL Version - */ +//! Querying SDL Version use std::ffi::CStr; use std::fmt; use crate::sys; -/// A structure that contains information about the version of SDL in use. +/// A structure that contains a version of SDL. #[derive(Copy, Clone, Eq, PartialEq, Hash, Debug, PartialOrd, Ord)] pub struct Version { /// major version @@ -27,7 +25,7 @@ impl Version { patch: sys::SDL_PATCHLEVEL as u8, }; - /// Convert a raw *SDL_version to Version. + /// Convert a raw SDL_version to Version. pub fn from_ll(v: sys::SDL_version) -> Version { Version { major: v.major,