don't use core::error for compiler compatibility
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
use core::{convert::Infallible, error::Error, fmt::Display};
|
use core::{convert::Infallible, fmt::Display};
|
||||||
|
|
||||||
use num_traits::{PrimInt, Unsigned};
|
use num_traits::{PrimInt, Unsigned};
|
||||||
|
|
||||||
@@ -11,7 +11,6 @@ pub enum StackCalcError {
|
|||||||
DecimalError(DecimalError),
|
DecimalError(DecimalError),
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Error for StackCalcError {}
|
|
||||||
impl Display for StackCalcError {
|
impl Display for StackCalcError {
|
||||||
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
|
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
|
||||||
match self {
|
match self {
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
pub mod calc;
|
pub mod calc;
|
||||||
|
|
||||||
use core::{error::Error, fmt::Display};
|
use core::fmt::Display;
|
||||||
#[cfg(not(test))]
|
#[cfg(not(test))]
|
||||||
use num_traits::float::FloatCore;
|
use num_traits::float::FloatCore;
|
||||||
use num_traits::{one, zero, PrimInt, Unsigned};
|
use num_traits::{one, zero, PrimInt, Unsigned};
|
||||||
@@ -13,7 +13,6 @@ pub enum DecimalError {
|
|||||||
NotANumber,
|
NotANumber,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Error for DecimalError {}
|
|
||||||
impl Display for DecimalError {
|
impl Display for DecimalError {
|
||||||
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
|
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
|
||||||
match self {
|
match self {
|
||||||
|
|||||||
Reference in New Issue
Block a user