Reuse unsupported::args
on wasm
This commit is contained in:
parent
fab8410801
commit
45bc1930ca
2 changed files with 1 additions and 42 deletions
|
@ -1,42 +0,0 @@
|
|||
use crate::ffi::OsString;
|
||||
use crate::fmt;
|
||||
use crate::vec;
|
||||
|
||||
pub fn args() -> Args {
|
||||
Args { iter: Vec::new().into_iter() }
|
||||
}
|
||||
|
||||
pub struct Args {
|
||||
iter: vec::IntoIter<OsString>,
|
||||
}
|
||||
|
||||
impl !Send for Args {}
|
||||
impl !Sync for Args {}
|
||||
|
||||
impl fmt::Debug for Args {
|
||||
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||
self.iter.as_slice().fmt(f)
|
||||
}
|
||||
}
|
||||
|
||||
impl Iterator for Args {
|
||||
type Item = OsString;
|
||||
fn next(&mut self) -> Option<OsString> {
|
||||
self.iter.next()
|
||||
}
|
||||
fn size_hint(&self) -> (usize, Option<usize>) {
|
||||
self.iter.size_hint()
|
||||
}
|
||||
}
|
||||
|
||||
impl ExactSizeIterator for Args {
|
||||
fn len(&self) -> usize {
|
||||
self.iter.len()
|
||||
}
|
||||
}
|
||||
|
||||
impl DoubleEndedIterator for Args {
|
||||
fn next_back(&mut self) -> Option<OsString> {
|
||||
self.iter.next_back()
|
||||
}
|
||||
}
|
|
@ -17,6 +17,7 @@
|
|||
#![deny(unsafe_op_in_unsafe_fn)]
|
||||
|
||||
pub mod alloc;
|
||||
#[path = "../unsupported/args.rs"]
|
||||
pub mod args;
|
||||
#[path = "../unsupported/cmath.rs"]
|
||||
pub mod cmath;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue