Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/test-utils/src/minicore.rs')
-rw-r--r--crates/test-utils/src/minicore.rs25
1 files changed, 24 insertions, 1 deletions
diff --git a/crates/test-utils/src/minicore.rs b/crates/test-utils/src/minicore.rs
index c447870e96..33a20951da 100644
--- a/crates/test-utils/src/minicore.rs
+++ b/crates/test-utils/src/minicore.rs
@@ -67,7 +67,7 @@
//! size_of: sized
//! sized:
//! slice:
-//! str:
+//! str: sized, result
//! sync: sized
//! transmute:
//! try: infallible
@@ -1726,6 +1726,22 @@ pub mod iter {
}
}
+ pub struct Map<I, F> {
+ iter: I,
+ f: F,
+ }
+ impl<B, I: Iterator, F> Iterator for Map<I, F>
+ where
+ F: FnMut(I::Item) -> B,
+ {
+ type Item = B;
+
+ #[inline]
+ fn next(&mut self) -> B {
+ loop {}
+ }
+ }
+
pub struct FilterMap<I, F> {
iter: I,
f: F,
@@ -1800,6 +1816,13 @@ pub mod iter {
{
loop {}
}
+ fn map<B, F>(self, _f: F) -> crate::iter::Map<Self, F>
+ where
+ Self: Sized,
+ F: FnMut(Self::Item) -> B,
+ {
+ loop {}
+ }
fn filter_map<B, F>(self, _f: F) -> crate::iter::FilterMap<Self, F>
where
Self: Sized,