Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
target/
2 changes: 1 addition & 1 deletion dev-deps/data-rs
2 changes: 1 addition & 1 deletion dev-deps/mem-rs
16 changes: 7 additions & 9 deletions doublets/src/data/traits.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ use bumpalo::Bump;
#[cfg(feature = "rayon")]
use rayon::prelude::*;
use std::{
default::default,
ops::{ControlFlow, Try},
};

Expand Down Expand Up @@ -79,7 +78,7 @@ pub trait Doublets<T: LinkType>: Links<T> {
where
Self: Sized,
{
let mut index = default();
let mut index = Default::default();
self.create_by_with(query, |_before, link| {
index = link.index;
Flow::Continue
Expand Down Expand Up @@ -165,7 +164,7 @@ pub trait Doublets<T: LinkType>: Links<T> {
where
Self: Sized,
{
let mut result = default();
let mut result = Default::default();
self.update_by_with(query, change, |_, after| {
result = after.index;
Flow::Continue
Expand Down Expand Up @@ -225,7 +224,7 @@ pub trait Doublets<T: LinkType>: Links<T> {
where
Self: Sized,
{
let mut result = default();
let mut result = Default::default();
self.delete_by_with(query, |_before, after| {
result = after.index;
Flow::Continue
Expand Down Expand Up @@ -347,7 +346,7 @@ pub trait Doublets<T: LinkType>: Links<T> {
R: Try<Output = ()>,
Self: Sized,
{
let mut new = default();
let mut new = Default::default();
let mut handler = Fuse::new(handler);
self.create_with(|before, after| {
new = after.index;
Expand All @@ -362,7 +361,7 @@ pub trait Doublets<T: LinkType>: Links<T> {
where
Self: Sized,
{
let mut result = default();
let mut result = Default::default();
self.create_link_with(source, target, |_, link| {
result = link.index;
Flow::Continue
Expand Down Expand Up @@ -653,7 +652,7 @@ impl<T: LinkType, All: Doublets<T> + Sized> DoubletsExt<T> for All {
self.each_iter([self.constants().any; 3])
}

type ImplIterEach = impl Iterator<Item = Link<T>> + ExactSizeIterator + DoubleEndedIterator;
type ImplIterEach = std::vec::IntoIter<Link<T>>;

#[cfg_attr(feature = "more-inline", inline)]
fn each_iter(&self, query: impl ToQuery<T>) -> Self::ImplIterEach {
Expand All @@ -677,8 +676,7 @@ impl<T: LinkType, All: Doublets<T> + Sized> DoubletsExt<T> for All {
}

#[cfg(feature = "small-search")]
type ImplIterEachSmall =
impl Iterator<Item = Link<T>> + ExactSizeIterator + DoubleEndedIterator;
type ImplIterEachSmall = std::vec::IntoIter<Link<T>>;

#[cfg(feature = "small-search")]
#[cfg_attr(feature = "more-inline", inline)]
Expand Down
7 changes: 2 additions & 5 deletions doublets/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,15 +1,12 @@
#![feature(fn_traits)]
#![feature(generators)]
#![feature(coroutines)]
#![feature(try_trait_v2)]
#![feature(default_free_fn)]
#![feature(unboxed_closures)]
#![feature(nonnull_slice_from_raw_parts)]
#![feature(associated_type_defaults)]
#![feature(type_alias_impl_trait)]
#![feature(maybe_uninit_uninit_array)]
#![feature(allocator_api)]
#![feature(bench_black_box)]
#![feature(maybe_uninit_array_assume_init)]
#![feature(impl_trait_in_assoc_type)]
#![cfg_attr(not(test), forbid(clippy::unwrap_used))]
#![warn(
clippy::perf,
Expand Down
4 changes: 2 additions & 2 deletions doublets/src/mem/split/store.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use std::{cmp::Ordering, default::default, error::Error, mem::transmute, ptr::NonNull};
use std::{cmp::Ordering, mem::transmute, ptr::NonNull};

use crate::{
mem::{
Expand Down Expand Up @@ -109,7 +109,7 @@ impl<
}

pub fn new(data_mem: MD, index_mem: MI) -> Result<Store<T, MD, MI>, LinksError<T>> {
Self::with_constants(data_mem, index_mem, default())
Self::with_constants(data_mem, index_mem, Default::default())
}

fn mut_from_mem<'a, U>(mut ptr: NonNull<[U]>, index: usize) -> Option<&'a mut U> {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use std::{default::default, marker::PhantomData, ptr::NonNull};
use std::{marker::PhantomData, ptr::NonNull};

use crate::{
mem::{header::LinksHeader, unit::raw_link::LinkPart, LinksTree},
Expand All @@ -22,7 +22,7 @@ impl<T: LinkType> LinksRecursionlessSizeBalancedTreeBase<T> {
mem,
r#break: constants.r#break,
r#continue: constants.r#continue,
_phantom: default(),
_phantom: Default::default(),
}
}
}
Expand Down
Loading