Clean way to patch the std

This commit is contained in:
2026-03-18 17:19:08 +01:00
parent 51780b3a78
commit a087bdd523
35 changed files with 6302 additions and 1430 deletions

View File

@@ -0,0 +1,42 @@
use crate::ffi::OsString;
use crate::fmt;
pub struct Args {}
pub fn args() -> Args {
Args {}
}
impl fmt::Debug for Args {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
f.debug_list().finish()
}
}
impl Iterator for Args {
type Item = OsString;
#[inline]
fn next(&mut self) -> Option<OsString> {
None
}
#[inline]
fn size_hint(&self) -> (usize, Option<usize>) {
(0, Some(0))
}
}
impl DoubleEndedIterator for Args {
#[inline]
fn next_back(&mut self) -> Option<OsString> {
None
}
}
impl ExactSizeIterator for Args {
#[inline]
fn len(&self) -> usize {
0
}
}