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