{"push_id":561388336,"size":1,"distinct_size":1,"ref":"refs/heads/std-env","head":"255cfa3017486ad037cfcb4f65bd245ac461b948","before":"847825ed70a0e85482b06f554d51220553d7b61a","commits":[{"sha":"255cfa3017486ad037cfcb4f65bd245ac461b948","author":{"email":"60c6d277a8bd81de7fdde19201bf9c58a3df08f4@alexcrichton.com","name":"Alex Crichton"},"message":"std: Add a new `env` module\n\nThis is an implementation of [RFC 578][rfc] which adds a new `std::env` module\nto replace most of the functionality in the current `std::os` module. More\ndetails can be found in the RFC itself, but as a summary the following methods\nhave all been deprecated:\n\n[rfc]: https://github.com/rust-lang/rfcs/pull/578\n\n* `os::args_as_bytes`   => `env::args`\n* `os::args`            => `env::args`\n* `os::consts`          => `env::consts`\n* `os::dll_filename`    => no replacement, use `env::consts` directly\n* `os::page_size`       => `env::page_size`\n* `os::make_absolute`   => use `env::current_dir` + `join` instead\n* `os::getcwd`          => `env::current_dir`\n* `os::change_dir`      => `env::set_current_dir`\n* `os::homedir`         => `env::home_dir`\n* `os::tmpdir`          => `env::temp_dir`\n* `os::join_paths`      => `env::join_paths`\n* `os::split_paths`     => `env::split_paths`\n* `os::self_exe_name`   => `env::current_exe`\n* `os::self_exe_path`   => use `env::current_exe` + `pop`\n* `os::set_exit_status` => `env::set_exit_status`\n* `os::get_exit_status` => `env::get_exit_status`\n* `os::env`             => `env::vars`\n* `os::env_as_bytes`    => `env::vars`\n* `os::getenv`          => `env::var` or `env::var_string`\n* `os::getenv_as_bytes` => `env::var`\n* `os::setenv`          => `env::set_var`\n* `os::unsetenv`        => `env::remove_var`\n\nMany function signatures have also been tweaked for various purposes, but the\nmain changes were:\n\n* `Vec`-returning APIs now all return iterators instead\n* All APIs are now centered around `OsString` instead of `Vec<u8>` or `String`.\n  There is currently on convenience API, `env::var_string`, which can be used to\n  get the value of an environment variable as a unicode `String`.\n\nAll old APIs are `#[deprecated]` in-place and will remain for some time to allow\nfor migrations. The semantics of the APIs have been tweaked slightly with regard\nto dealing with invalid unicode (panic instead of replacement).\n\nThe new `std::env` module is all contained within the `env` feature, so crates\nmust add the following to access the new APIs:\n\n    #![feature(env)]\n\n[breaking-change]","distinct":true,"url":"https://api.github.com/repos/alexcrichton/rust/commits/255cfa3017486ad037cfcb4f65bd245ac461b948"}]}