awslabs / tough

Rust libraries and tools for using and generating TUF repositories

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

`Repository::all_targets()` cannot actually be used

iliana opened this issue · comments

https://docs.rs/tough/0.12.5/tough/struct.Repository.html#method.all_targets

tough/tough/src/lib.rs

Lines 413 to 416 in 86a0b6e

///return a vec of all targets including all target files delegated by targets
pub fn all_targets(&self) -> impl Iterator + '_ {
self.targets.signed.targets_iter()
}

Because the Item associated type isn't specified, all a caller is able to know is that this return type is an Iterator, but not what it contains.

The return type should match Targets::targets_iter.