Skip to content

Commit

Permalink
Minor cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
Nemo157 committed Feb 5, 2019
1 parent 7a509b1 commit 8ef433a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/pin_iterator.rs → src/iter.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use {
core::{marker::Unpin, pin::Pin},
core::pin::Pin,
pin_utils::pin_mut,
};

Expand Down
4 changes: 2 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ pub mod gen_iter;
#[macro_use]
mod utils;

pub mod pin_iterator;
pub use self::pin_iterator::{map, FusedPinIterator, PinIterator};
pub mod iter;
pub use self::iter::{FusedPinIterator, PinIterator};

pub mod list;
4 changes: 2 additions & 2 deletions src/list.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ impl<T> List<T> {
}

pin_let!(nodes = self.iter_nodes());
while let Some(node) = nodes.as_mut().next() {
for node in nodes.as_mut().iter() {
if node.next == to_remove.as_mut().as_ptr() {
*node.project().next = *to_remove.as_mut().project().next;
to_remove.on_detached();
Expand All @@ -66,7 +66,7 @@ impl<T> List<T> {
pub fn iter<'a>(self: Pin<&'a mut Self>) -> impl PinIterator<Item = &'a mut T> + 'a {
gen_iter! {
pin_let!(nodes = self.iter_nodes());
while let Some(node) = nodes.as_mut().next() {
for node in nodes.as_mut().iter() {
yield node.project().value;
}
}
Expand Down

0 comments on commit 8ef433a

Please sign in to comment.