Version -> 0.2.0. Change full num
dependency to the lighter num_traits
.
This commit is contained in:
parent
d2804e5b53
commit
a119c17336
|
@ -2,18 +2,18 @@
|
||||||
name = "qrcode"
|
name = "qrcode"
|
||||||
description = "QR code encoder in Rust"
|
description = "QR code encoder in Rust"
|
||||||
license = "Apache-2.0"
|
license = "Apache-2.0"
|
||||||
version = "0.1.8"
|
version = "0.2.0"
|
||||||
authors = ["kennytm <kennytm@gmail.com>"]
|
authors = ["kennytm <kennytm@gmail.com>"]
|
||||||
keywords = ["qrcode"]
|
keywords = ["qrcode"]
|
||||||
repository = "https://github.com/kennytm/qrcode-rust"
|
repository = "https://github.com/kennytm/qrcode-rust"
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
documentation = "http://kennytm.github.io/qrcode-rust/qrcode-rust/qrcode/"
|
documentation = "http://kennytm.github.io/qrcode-rust/"
|
||||||
exclude = [
|
exclude = [
|
||||||
"scripts/*", ".travis.yml", ".gitignore"
|
".travis.yml", ".gitignore"
|
||||||
]
|
]
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
num = "0.1"
|
num-traits = "0.1.32"
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
bench = []
|
bench = []
|
||||||
|
|
|
@ -11,13 +11,13 @@
|
||||||
|
|
||||||
use std::iter::repeat;
|
use std::iter::repeat;
|
||||||
use std::cmp::max;
|
use std::cmp::max;
|
||||||
use num::traits::PrimInt;
|
|
||||||
use std::ops::Range;
|
use std::ops::Range;
|
||||||
|
|
||||||
|
use num_traits::PrimInt;
|
||||||
|
|
||||||
use types::{Version, EcLevel};
|
use types::{Version, EcLevel};
|
||||||
|
|
||||||
// TODO remove this after it is decided whether we want `p ... q` or
|
// TODO remove this after `p ... q` becomes stable. See rust-lang/rust#28237.
|
||||||
// `(p .. q).inclusive()`
|
|
||||||
fn range_inclusive<N: PrimInt>(from: N, to: N) -> Range<N> {
|
fn range_inclusive<N: PrimInt>(from: N, to: N) -> Range<N> {
|
||||||
from .. (to + N::one())
|
from .. (to + N::one())
|
||||||
}
|
}
|
||||||
|
@ -1884,7 +1884,7 @@ impl Canvas {
|
||||||
//}}}
|
//}}}
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
|
|
||||||
// Copyright 2014 Kenny Chan
|
// Copyright 2014-2016 kennytm
|
||||||
//
|
//
|
||||||
// Licensed under the Apache License, Version 2.0 (the "License"); you may not
|
// Licensed under the Apache License, Version 2.0 (the "License"); you may not
|
||||||
// use this file except in compliance with the License. You may obtain a copy of
|
// use this file except in compliance with the License. You may obtain a copy of
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
|
|
||||||
#[cfg(feature="bench")]
|
#[cfg(feature="bench")]
|
||||||
extern crate test;
|
extern crate test;
|
||||||
extern crate num;
|
extern crate num_traits;
|
||||||
|
|
||||||
use std::ops::Index;
|
use std::ops::Index;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue