diff --git a/Cargo.toml b/Cargo.toml index fc5d8894..b6497064 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 c27ac5e9..0c81217d 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 5979f86d..691e14c2 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 3d755f12..416ad577 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;