From 5bbfb9187d09ad8e613e6fbe4426cbd05c2a163a Mon Sep 17 00:00:00 2001 From: Richard Dodd Date: Fri, 2 Mar 2018 21:37:51 +0000 Subject: [PATCH] Add no_std and fix tests --- Cargo.toml | 2 +- src/lib.rs | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index a3a4b41..8771188 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,7 +2,7 @@ name = "integer-sqrt" description = """ An implementation of integer square root algorithm for primitive rust types""" -version = "0.1.0" +version = "0.1.1" authors = ["Richard Dodd "] include = ["src/**/*.rs", "Cargo.toml"] repository = "https://github.com/derekdreery/integer-sqrt-rs" diff --git a/src/lib.rs b/src/lib.rs index 48f18c3..4b5938b 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -11,9 +11,11 @@ //! //! # fn main() { //! assert_eq!(4u8.integer_sqrt(), 2); +//! # } //! ``` //! //! [`IntegerSquareRoot`]: ./trait.IntegerSquareRoot.html +#![no_std] /// A trait implementing integer square root. pub trait IntegerSquareRoot { @@ -88,7 +90,7 @@ impl_isqrt!(usize, u64, u32, u16, u8, isize, i64, i32, i16, i8); #[cfg(test)] mod tests { use super::IntegerSquareRoot; - use std::{u8, u16, u64, i8}; + use core::{u8, u16, u64, i8}; #[test] fn u8_sqrt() {