edition 2018

This commit is contained in:
klensy
2023-07-20 17:23:56 +03:00
parent 0db7a3a020
commit dd34581ec9
17 changed files with 32 additions and 30 deletions

View File

@@ -1,5 +1,5 @@
use float::Float;
use int::{CastInto, Int};
use crate::float::Float;
use crate::int::{CastInto, Int};
/// Returns `a + b`
fn add<F: Float>(a: F, b: F) -> F

View File

@@ -1,7 +1,7 @@
#![allow(unreachable_code)]
use float::Float;
use int::Int;
use crate::float::Float;
use crate::int::Int;
#[derive(Clone, Copy)]
enum Result {

View File

@@ -2,8 +2,8 @@
// `return`s makes it clear where function exit points are
#![allow(clippy::needless_return)]
use float::Float;
use int::{CastInto, DInt, HInt, Int};
use crate::float::Float;
use crate::int::{CastInto, DInt, HInt, Int};
fn div32<F: Float>(a: F, b: F) -> F
where

View File

@@ -1,5 +1,5 @@
use float::Float;
use int::{CastInto, Int};
use crate::float::Float;
use crate::int::{CastInto, Int};
/// Generic conversion from a narrower to a wider IEEE-754 floating-point type
fn extend<F: Float, R: Float>(a: F) -> R

View File

@@ -1,5 +1,5 @@
use float::Float;
use int::{CastInto, DInt, HInt, Int};
use crate::float::Float;
use crate::int::{CastInto, DInt, HInt, Int};
fn mul<F: Float>(a: F, b: F) -> F
where

View File

@@ -1,5 +1,5 @@
use float::Float;
use int::Int;
use crate::float::Float;
use crate::int::Int;
/// Returns `a` raised to the power `b`
fn pow<F: Float>(a: F, b: i32) -> F {

View File

@@ -1,6 +1,6 @@
use float::add::__adddf3;
use float::add::__addsf3;
use float::Float;
use crate::float::add::__adddf3;
use crate::float::add::__addsf3;
use crate::float::Float;
intrinsics! {
#[arm_aeabi_alias = __aeabi_fsub]

View File

@@ -1,5 +1,5 @@
use float::Float;
use int::{CastInto, Int};
use crate::float::Float;
use crate::int::{CastInto, Int};
fn trunc<F: Float, R: Float>(a: F) -> R
where