fn size_hint(&self) -> (usize, Option<usize>) { self.inner.size_hint() }
}
+impl ExactSizeIterator for Args {
+ fn len(&self) -> usize { self.inner.len() }
+}
+
impl Iterator for ArgsOs {
type Item = OsString;
fn next(&mut self) -> Option<OsString> { self.inner.next() }
fn size_hint(&self) -> (usize, Option<usize>) { self.inner.size_hint() }
}
+impl ExactSizeIterator for ArgsOs {
+ fn len(&self) -> usize { self.inner.len() }
+}
+
/// Returns the page size of the current architecture in bytes.
pub fn page_size() -> usize {
os_imp::page_size()
fn size_hint(&self) -> (usize, Option<usize>) { self.iter.size_hint() }
}
+impl ExactSizeIterator for Args {
+ fn len(&self) -> usize { self.iter.len() }
+}
+
/// Returns the command line arguments
///
/// Returns a list of the command line arguments.
fn size_hint(&self) -> (usize, Option<usize>) { self.range.size_hint() }
}
+impl ExactSizeIterator for Args {
+ fn len(&self) -> usize { self.range.len() }
+}
+
impl Drop for Args {
fn drop(&mut self) {
unsafe { c::LocalFree(self.cur as *mut c_void); }