don't use core::error for compiler compatibility

This commit is contained in:
2025-07-18 21:19:30 +01:00
parent 5b7c532353
commit 77928c8fcb
2 changed files with 2 additions and 4 deletions

View File

@@ -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 {

View File

@@ -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 {