diff --git a/Cargo.toml b/Cargo.toml index fc5d88943dcfcb7c99c7dc4569f803a8bb96637d..b6497064b23c3a3cada02e8e6e394bbf2624ae04 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -8,4 +8,4 @@ bitflags = "1.1" [lib] name = "rs" path = "src/lib.rs" -crate-type = ["staticlib"] +crate-type = ["staticlib", "rlib"] diff --git a/src/float_ord.rs b/src/float_ord.rs index c27ac5e938e989e76b8712dac3747d3aaab40ffc..0c81217de6fef7f6ec3f05f719de3f8e1f1306fe 100644 --- a/src/float_ord.rs +++ b/src/float_ord.rs @@ -5,6 +5,10 @@ /* Adapted from https://github.com/notriddle/rust-float-ord revision e995165f * maintained by Michael Howell * licensed under MIT / Apache-2.0 licenses + * + * This version drops any dependency on rand. + * Caution: Don't pull the version from crates.io + * before making sure rand is optional. */ extern crate core; @@ -67,6 +71,7 @@ float_ord_impl!(f64, u64, 64); /// # Example /// /// ``` +/// use rs::float_ord; /// let mut v = [-5.0, 4.0, 1.0, -3.0, 2.0]; /// /// float_ord::sort(&mut v); diff --git a/src/imservice.rs b/src/imservice.rs index 5979f86d88bd4e8edfc23cdb7f0359c4577878ef..691e14c238df93db3f785cfe511d2fccc4b68e87 100644 --- a/src/imservice.rs +++ b/src/imservice.rs @@ -230,7 +230,8 @@ bitflags!{ /// Map to `text_input_unstable_v3.content_purpose` values /// /// ``` -/// assert_eq!(ContentPurpose::Alpha as u32, 0); +/// use rs::imservice::ContentPurpose; +/// assert_eq!(ContentPurpose::Alpha as u32, 1); /// ``` #[derive(Debug, Clone)] pub enum ContentPurpose { diff --git a/src/lib.rs b/src/lib.rs index 3d755f1202d0123e2bb40dee6f50c1d57fa2f68a..416ad5779ca1ff9707973448146995c8e238947f 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,8 +1,8 @@ #[macro_use] extern crate bitflags; -mod float_ord; -mod imservice; +pub mod float_ord; +pub mod imservice; mod keyboard; mod layout; mod symbol;