forked from M-Labs/nalgebra
cargo fmt
This commit is contained in:
parent
b74be8499f
commit
a753d84aae
@ -74,7 +74,7 @@ pub fn spadd_cs_prealloc<T>(
|
|||||||
a: Op<&CsMatrix<T>>,
|
a: Op<&CsMatrix<T>>,
|
||||||
) -> Result<(), OperationError>
|
) -> Result<(), OperationError>
|
||||||
where
|
where
|
||||||
T: Scalar + ClosedAdd + ClosedMul + Zero + One+PartialEq,
|
T: Scalar + ClosedAdd + ClosedMul + Zero + One + PartialEq,
|
||||||
{
|
{
|
||||||
match a {
|
match a {
|
||||||
Op::NoOp(a) => {
|
Op::NoOp(a) => {
|
||||||
|
@ -967,7 +967,7 @@ where
|
|||||||
self.fill_fn(|| MaybeUninit::new(T::zero()));
|
self.fill_fn(|| MaybeUninit::new(T::zero()));
|
||||||
|
|
||||||
// Safety: there's no (uninitialized) values.
|
// Safety: there's no (uninitialized) values.
|
||||||
return unsafe{self.assume_init_mut()};
|
return unsafe { self.assume_init_mut() };
|
||||||
}
|
}
|
||||||
|
|
||||||
let (rsa, csa) = a.strides();
|
let (rsa, csa) = a.strides();
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
use crate::{
|
use crate::{
|
||||||
DualQuaternion, Isometry3, Quaternion, SimdRealField, Translation3, UnitDualQuaternion,
|
DualQuaternion, Isometry3, Quaternion, SimdRealField, Translation3, UnitDualQuaternion,
|
||||||
UnitQuaternion,
|
UnitQuaternion,
|
||||||
};
|
};
|
||||||
use num::{One, Zero};
|
use num::{One, Zero};
|
||||||
|
@ -82,9 +82,11 @@ where
|
|||||||
DefaultAllocator: Allocator<T, D>,
|
DefaultAllocator: Allocator<T, D>,
|
||||||
OVector<T, D>: fmt::Debug,
|
OVector<T, D>: fmt::Debug,
|
||||||
{
|
{
|
||||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||||
f.debug_struct("OPoint").field("coords",&self.coords).finish()
|
f.debug_struct("OPoint")
|
||||||
}
|
.field("coords", &self.coords)
|
||||||
|
.finish()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(feature = "bytemuck")]
|
#[cfg(feature = "bytemuck")]
|
||||||
|
@ -28,7 +28,7 @@ use crate::geometry::{
|
|||||||
|
|
||||||
impl<T1, T2> SubsetOf<Quaternion<T2>> for Quaternion<T1>
|
impl<T1, T2> SubsetOf<Quaternion<T2>> for Quaternion<T1>
|
||||||
where
|
where
|
||||||
T2 : SupersetOf<T1>,
|
T2: SupersetOf<T1>,
|
||||||
{
|
{
|
||||||
#[inline]
|
#[inline]
|
||||||
fn to_superset(&self) -> Quaternion<T2> {
|
fn to_superset(&self) -> Quaternion<T2> {
|
||||||
@ -49,8 +49,8 @@ where
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl<T1, T2> SubsetOf<UnitQuaternion<T2>> for UnitQuaternion<T1>
|
impl<T1, T2> SubsetOf<UnitQuaternion<T2>> for UnitQuaternion<T1>
|
||||||
where
|
where
|
||||||
T2: SupersetOf<T1>,
|
T2: SupersetOf<T1>,
|
||||||
{
|
{
|
||||||
#[inline]
|
#[inline]
|
||||||
fn to_superset(&self) -> UnitQuaternion<T2> {
|
fn to_superset(&self) -> UnitQuaternion<T2> {
|
||||||
|
@ -266,7 +266,7 @@ where
|
|||||||
|
|
||||||
// IMPORTANT TODO: this method is still UB, and we should decide how to
|
// IMPORTANT TODO: this method is still UB, and we should decide how to
|
||||||
// update the API to take it into account.
|
// update the API to take it into account.
|
||||||
|
|
||||||
unsafe {
|
unsafe {
|
||||||
i.set_len(nvals);
|
i.set_len(nvals);
|
||||||
}
|
}
|
||||||
|
@ -242,8 +242,7 @@ where
|
|||||||
|
|
||||||
let mut res = CsMatrix::new_uninitialized_generic(nrows1, ncols2, self.len() + rhs.len());
|
let mut res = CsMatrix::new_uninitialized_generic(nrows1, ncols2, self.len() + rhs.len());
|
||||||
let mut timestamps = OVector::zeros_generic(nrows1, Const::<1>);
|
let mut timestamps = OVector::zeros_generic(nrows1, Const::<1>);
|
||||||
let mut workspace =
|
let mut workspace = Matrix::new_uninitialized_generic(nrows1, Const::<1>);
|
||||||
Matrix::new_uninitialized_generic(nrows1, Const::<1>) ;
|
|
||||||
let mut nz = 0;
|
let mut nz = 0;
|
||||||
|
|
||||||
for j in 0..ncols2.value() {
|
for j in 0..ncols2.value() {
|
||||||
|
Loading…
Reference in New Issue
Block a user