Skip to content

Commit

Permalink
Merge pull request #106 from iliekturtles/v0.20.1
Browse files Browse the repository at this point in the history
v0.20.1
  • Loading branch information
iliekturtles committed Sep 16, 2018
2 parents fef4129 + aef307e commit 98b162f
Show file tree
Hide file tree
Showing 6 changed files with 35 additions and 16 deletions.
9 changes: 8 additions & 1 deletion CHANGELOG.md
Expand Up @@ -9,6 +9,12 @@
### Fixed
### Security
-->
## [v0.20.1] — 2018-09-13
This release resolves nightly rustc error E0659 the base.rs example caused by
[rust-lang/rust](https://github.com/rust-lang/rust) pull request
[#52841](https://github.com/rust-lang/rust/pull/52841) "resolve: Implement prelude search for macro
paths, implement tool attributes."

## [v0.20.0] — 2018-09-06
This release resolves long-standing issue [#3](https://github.com/iliekturtles/uom/issues/3) to
implement thermodynamic temperature conversions (e.g. Celsius to Fahrenheit). Support is also added
Expand Down Expand Up @@ -277,7 +283,8 @@ for the creation of custom systems or the use of the pre-built SI. Basic mathema
are implemented and a minimal set of quantities (length, mass, time...) and units (meter, kilometer,
foot, mile, ...) are included.

[Unreleased]: https://github.com/iliekturtles/uom/compare/v0.20.0...master
[Unreleased]: https://github.com/iliekturtles/uom/compare/v0.20.1...master
[v0.20.1]: https://github.com/iliekturtles/uom/compare/v0.20.0...v0.20.1
[v0.20.0]: https://github.com/iliekturtles/uom/compare/v0.19.0...v0.20.0
[v0.19.0]: https://github.com/iliekturtles/uom/compare/v0.18.0...v0.19.0
[v0.18.0]: https://github.com/iliekturtles/uom/compare/v0.17.0...v0.18.0
Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "uom"
version = "0.20.0"
version = "0.20.1"
authors = ["Mike Boutin <mike.boutin@gmail.com>"]
description = "Units of measurement"
documentation = "https://docs.rs/uom"
Expand Down
4 changes: 2 additions & 2 deletions README.md
Expand Up @@ -28,7 +28,7 @@ Units of measurement is a crate that does automatic type-safe zero-cost

```toml
[dependencies]
uom = "0.20.0"
uom = "0.20.1"
```

and this to your crate root:
Expand Down Expand Up @@ -73,7 +73,7 @@ enabled by default. Features can be cherry-picked by using the `--no-default-fea
```toml
[dependencies]
uom = {
version = "0.20.0",
version = "0.20.1",
default-features = false,
features = [
"autoconvert", # automatic base unit conversion.
Expand Down
16 changes: 12 additions & 4 deletions src/lib.rs
Expand Up @@ -18,7 +18,7 @@
//!
//! ```toml
//! [dependencies]
//! uom = "0.20.0"
//! uom = "0.20.1"
//! ```
//!
//! and this to your crate root:
Expand All @@ -31,7 +31,11 @@
//! invalid operations:
//!
#![cfg_attr(all(feature = "si", feature = "f32"), doc = " ```rust")]
#![cfg_attr(not(all(feature = "si", feature = "f32")), doc = " ```rust,ignore")]
//#![cfg_attr(rustfmt, rustfmt_skip)]
#![cfg_attr(
not(all(feature = "si", feature = "f32")),
doc = " ```rust,ignore"
)]
//! extern crate uom;
//!
//! use uom::si::f32::*;
Expand Down Expand Up @@ -61,7 +65,7 @@
//! ```toml
//! [dependencies]
//! uom = {
//! version = "0.20.0",
//! version = "0.20.1",
//! default-features = false,
//! features = [
//! "autoconvert", # automatic base unit conversion.
Expand Down Expand Up @@ -158,7 +162,11 @@
#![warn(unused_qualifications)]
#![warn(unused_results)]
// Clippy lints.
#![cfg_attr(feature = "cargo-clippy", allow(inline_always, excessive_precision))]
//#![cfg_attr(rustfmt, rustfmt_skip)]
#![cfg_attr(
feature = "cargo-clippy",
allow(inline_always, excessive_precision)
)]

// Fail to compile if no underlying storage type features are specified.
#[cfg_attr(rustfmt, rustfmt_skip)]
Expand Down
6 changes: 5 additions & 1 deletion src/storage_types.rs
Expand Up @@ -17,7 +17,11 @@
/// * `$tt`: Code to place into each storage type module.
///
#[cfg_attr(all(feature = "f32", feature = "f64"), doc = " ```rust")]
#[cfg_attr(not(all(feature = "f32", feature = "f64")), doc = " ```rust,ignore")]
//#[cfg_attr(rustfmt, rustfmt_skip)]
#[cfg_attr(
not(all(feature = "f32", feature = "f64")),
doc = " ```rust,ignore"
)]
/// #[macro_use]
/// extern crate uom;
///
Expand Down
14 changes: 7 additions & 7 deletions src/system.rs
Expand Up @@ -1315,21 +1315,21 @@ macro_rules! system {
#[macro_export]
macro_rules! $quantities {
($path:path) => {
use $path as system;
use $path as __system;

$(/// [`Quantity`](struct.Quantity.html) type alias using the default base units
/// parameterized on the underlying storage type.
#[allow(dead_code)]
#[allow(unused_qualifications)]
pub type $quantity<V> = system::$module::$quantity<system::$units<V>, V>;)+
pub type $quantity<V> = __system::$module::$quantity<__system::$units<V>, V>;)+
};
($path:path, $V:ty) => {
use $path as system;
use $path as __system;

$(/// [`Quantity`](struct.Quantity.html) type alias using the default base units.
#[allow(dead_code)]
#[allow(unused_qualifications)]
pub type $quantity = system::$module::$quantity<system::$units<$V>, $V>;)+
pub type $quantity = __system::$module::$quantity<__system::$units<$V>, $V>;)+
};
($path:path, $V:ty, $U:tt) => {
system!(@quantities $path, $V; $($name),+; $U; $($module::$quantity),+);
Expand All @@ -1343,14 +1343,14 @@ macro_rules! system {
($($U:ident),+);
$($module:ident::$quantity:ident),+
) => {
use $path as system;
use $path as __system;

type Units = system::Units<$V, $($name = system::$name::$U,)+>;
type Units = __system::Units<$V, $($name = __system::$name::$U,)+>;

$(/// [`Quantity`](struct.Quantity.html) type alias using the given base units.
#[allow(dead_code)]
#[allow(unused_qualifications)]
pub type $quantity = system::$module::$quantity<Units, $V>;)+
pub type $quantity = __system::$module::$quantity<Units, $V>;)+
};
(@replace $_t:tt $sub:ty) => { $sub };
}

0 comments on commit 98b162f

Please sign in to comment.