Skip to content

Fixes errors when building docs. #66

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
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
2 changes: 1 addition & 1 deletion src/iter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
I: Iterator<Item = R>,
{
/// Obtain an [`OverlapIterator`] over a subslice of `memory` that overlaps with the region in `self`
fn overlaps(self, memory: &'a [u8], base_address: u32) -> OverlapIterator<R, I>;

Check warning on line 22 in src/iter.rs

View workflow job for this annotation

GitHub Actions / clippy

elided lifetime has a name

warning: elided lifetime has a name --> src/iter.rs:22:75 | 16 | pub trait IterableByOverlaps<'a, R, I> | -- lifetime `'a` declared here ... 22 | fn overlaps(self, memory: &'a [u8], base_address: u32) -> OverlapIterator<R, I>; | ^ this elided lifetime gets resolved as `'a` | = note: `#[warn(elided_named_lifetimes)]` on by default

Check warning on line 22 in src/iter.rs

View workflow job for this annotation

GitHub Actions / ci-linux (stable, thumbv7m-none-eabi)

elided lifetime has a name

Check warning on line 22 in src/iter.rs

View workflow job for this annotation

GitHub Actions / ci-linux (stable, x86_64-unknown-linux-gnu)

elided lifetime has a name

Check warning on line 22 in src/iter.rs

View workflow job for this annotation

GitHub Actions / ci-linux (nightly, x86_64-unknown-linux-gnu, true)

elided lifetime has a name

Check warning on line 22 in src/iter.rs

View workflow job for this annotation

GitHub Actions / ci-linux (stable, thumbv6m-none-eabi)

elided lifetime has a name
}

impl<'a, R, I> Iterator for OverlapIterator<'a, R, I>
Expand All @@ -32,7 +32,7 @@
fn next(&mut self) -> Option<Self::Item> {
let mem_start = self.base_address;
let mem_end = self.base_address + self.memory.len() as u32;
while let Some(region) = self.regions.next() {

Check warning on line 35 in src/iter.rs

View workflow job for this annotation

GitHub Actions / clippy

this loop could be written as a `for` loop

warning: this loop could be written as a `for` loop --> src/iter.rs:35:3 | 35 | while let Some(region) = self.regions.next() { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for region in self.regions.by_ref()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_on_iterator = note: `#[warn(clippy::while_let_on_iterator)]` on by default
if mem_start < region.end() && mem_end >= region.start() {
let addr_start = core::cmp::max(mem_start, region.start());
let addr_end = core::cmp::min(mem_end, region.end());
Expand All @@ -45,13 +45,13 @@
}
}

/// Blanket implementation for all types implementing [`Iterator`] over [`Regions`]
/// Blanket implementation for all types implementing [`Iterator`] over [`Region`]
impl<'a, R, I> IterableByOverlaps<'a, R, I> for I
where
R: Region,
I: Iterator<Item = R>,
{
fn overlaps(self, memory: &'a [u8], base_address: u32) -> OverlapIterator<R, I> {

Check warning on line 54 in src/iter.rs

View workflow job for this annotation

GitHub Actions / clippy

elided lifetime has a name

warning: elided lifetime has a name --> src/iter.rs:54:75 | 49 | impl<'a, R, I> IterableByOverlaps<'a, R, I> for I | -- lifetime `'a` declared here ... 54 | fn overlaps(self, memory: &'a [u8], base_address: u32) -> OverlapIterator<R, I> { | ^ this elided lifetime gets resolved as `'a`

Check warning on line 54 in src/iter.rs

View workflow job for this annotation

GitHub Actions / ci-linux (stable, thumbv7m-none-eabi)

elided lifetime has a name

Check warning on line 54 in src/iter.rs

View workflow job for this annotation

GitHub Actions / ci-linux (stable, x86_64-unknown-linux-gnu)

elided lifetime has a name

Check warning on line 54 in src/iter.rs

View workflow job for this annotation

GitHub Actions / ci-linux (nightly, x86_64-unknown-linux-gnu, true)

elided lifetime has a name

Check warning on line 54 in src/iter.rs

View workflow job for this annotation

GitHub Actions / ci-linux (stable, thumbv6m-none-eabi)

elided lifetime has a name
OverlapIterator {
memory,
regions: self,
Expand Down
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#![deny(missing_docs)]
#![deny(unsafe_code)]

/// Currently contains [`OverlapIterator`]
/// Currently contains [`OverlapIterator`](iter::OverlapIterator)
pub mod iter;
/// Technology specific traits for NOR Flashes
pub mod nor_flash;
Expand Down
Loading