Skip to content

Commit

Permalink
Resolve clippy warnings.
Browse files Browse the repository at this point in the history
 * `crate::num::One` unnecessary qualification.
 * `quantity!` `trait Conversion` dead code.
  • Loading branch information
iliekturtles committed Mar 20, 2024
1 parent 1322b57 commit c360507
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -424,7 +424,7 @@ pub trait Conversion<V> {
#[must_use = "method returns a new number and does not mutate the original value"]
#[inline(always)]
fn coefficient() -> Self::T {
<Self::T as crate::num::One>::one()
<Self::T as num::One>::one()
}

/// Constant portion of [conversion factor](https://jcgm.bipm.org/vim/en/1.24.html) for
Expand All @@ -437,7 +437,7 @@ pub trait Conversion<V> {
#[inline(always)]
#[allow(unused_variables)]
fn constant(op: ConstantOp) -> Self::T {
<Self::T as crate::num::Zero>::zero()
<Self::T as num::Zero>::zero()
}

/// Instance [conversion factor](https://jcgm.bipm.org/vim/en/1.24.html).
Expand Down
1 change: 1 addition & 0 deletions src/quantity.rs
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ macro_rules! quantity {
///
/// [units]: https://jcgm.bipm.org/vim/en/1.13.html
/// [factor]: https://jcgm.bipm.org/vim/en/1.24.html
#[allow(dead_code)]
pub trait Conversion<V>: Unit + $crate::Conversion<V, T = <V as $crate::Conversion<V>>::T>
where
V: $crate::Conversion<V>,
Expand Down

0 comments on commit c360507

Please sign in to comment.