| use crate::ffi::{OsStr, OsString}; | |
| use crate::{fmt, io}; | |
| pub struct Env(!); | |
| impl fmt::Debug for Env { | |
| fn fmt(&self, _: &mut fmt::Formatter<'_>) -> fmt::Result { | |
| self.0 | |
| } | |
| } | |
| impl Iterator for Env { | |
| type Item = (OsString, OsString); | |
| fn next(&mut self) -> Option<(OsString, OsString)> { | |
| self.0 | |
| } | |
| } | |
| pub fn env() -> Env { | |
| panic!("not supported on this platform") | |
| } | |
| pub fn getenv(_: &OsStr) -> Option<OsString> { | |
| None | |
| } | |
| pub unsafe fn setenv(_: &OsStr, _: &OsStr) -> io::Result<()> { | |
| Err(io::const_error!(io::ErrorKind::Unsupported, "cannot set env vars on this platform")) | |
| } | |
| pub unsafe fn unsetenv(_: &OsStr) -> io::Result<()> { | |
| Err(io::const_error!(io::ErrorKind::Unsupported, "cannot unset env vars on this platform")) | |
| } |