From 87c03e285d3fc07f54d39b270573db1e4f05b443 Mon Sep 17 00:00:00 2001 From: Petr Sabanov Date: Fri, 11 Oct 2024 18:48:05 +0300 Subject: [PATCH] Added brief modules documentation --- src/bcp47.rs | 2 ++ src/lib.rs | 4 ++-- src/posix.rs | 2 ++ 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/bcp47.rs b/src/bcp47.rs index 923d7e4..7f23e15 100644 --- a/src/bcp47.rs +++ b/src/bcp47.rs @@ -14,6 +14,8 @@ // You should have received a copy of the GNU Lesser General Public License // along with this program. If not, see . +//! A module for matching locales in the [BCP 47](https://www.ietf.org/rfc/bcp/bcp47.html) format. + use language_tags::LanguageTag; /// Finds the best matching locale from a list of available locales based on a list of user locales. diff --git a/src/lib.rs b/src/lib.rs index fa8093d..ab54991 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -17,8 +17,8 @@ //! A small library for selecting the best match for user's preferred locales from available locales. //! //! The library consists of two modules: -//! * `bcp47` - for matching locales in the [BCP 47](https://www.ietf.org/rfc/bcp/bcp47.html) format -//! * `posix` - for matching locales in the [POSIX](https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/V1_chap08.html) format +//! * [`bcp47`] — for matching locales in the [BCP 47](https://www.ietf.org/rfc/bcp/bcp47.html) format. +//! * [`posix`] — for matching locales in the [POSIX](https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/V1_chap08.html) format. //! //! Both modules provide the `best_matching_locale` function. //! diff --git a/src/posix.rs b/src/posix.rs index 8329c55..acc01d8 100644 --- a/src/posix.rs +++ b/src/posix.rs @@ -14,6 +14,8 @@ // You should have received a copy of the GNU Lesser General Public License // along with this program. If not, see . +//! A module for matching locales in the [POSIX](https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/V1_chap08.html) format. + /// Finds the best matching locale from a list of available locales based on a list of user locales. /// The function expects locales to be valid POSIX locales according to /// [The Open Group Base Specifications Issue 8 - 8. Environment Variables](https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/V1_chap08.html),